Subject Re: two machines - different resultsets for ORDER BY
Author Adam
--- In, "d_dude_2003"
<d_dude_2003@...> wrote:
> I have a stored procedure which returns the rows
> using ORDER BY StringField ASC, IDField DESC...
> On my machine, it works as expected. However on customer's machine
> StringFields are slighly out of order. For example, it first returns
> Bxxxxxx, then few Cxxx rows, then again Bxxxxx...

How do you test this? Through your application or through iSQL? I ask
because some Dataset based components can do their own sorting. You
may have also accidentally forgotton to add the order by clause and
are reading from storage order. Storage order frequently resembles
chronological order, but as records are deleted and the space reused
it can get jumbled.

Give the following a try:

ORDER BY StringField || '' ASC, IDField+0 DESC

This will prevent any index from being used in the ordering, and
should tell you whether you have a corrupt index. If so, drop the
ind(ex)/(ices) and redefine them.

There are no settings regarding the ordering of strings.