Page 1 of 1

Order by cast

Posted: Wed 21 Apr 2010 22:12
by Beluco
Using the IBExpert:
select N.NUMERO from TESTE N order by cast(N.NUMERO as begint);
or ... order by lpad(N.NUMERO, 20, '0')
works perfectly.
But with D2009 + DbxIda 2.50.22 = does not work.
Please some advice / suggestions?

Posted: Thu 22 Apr 2010 07:23
by Dimon
I could not reproduce the problem.
Please send me a complete small sample to dmitryg*devart*com to demonstrate it, including a script to create and fill table.

Posted: Thu 22 Apr 2010 17:53
by Beluco
Now I became ill.
Under Development app and a small table with data to send them, found that it works properly.
Then, more motivated, reviewed in detail the lines of code in the app and also use the table, and finds nothing wrong. However, no ordering appropriately (ordered alphabetically, but not ordering as bigint).
Any suggestions?
Thank you.

Posted: Thu 22 Apr 2010 20:04
by Beluco
Ok, I found the problem:
set was missing in poRetainServerOrder = True no DataSetProvider.
is solved.

Posted: Fri 23 Apr 2010 06:25
by Dimon
It is good to see that this problem has been solved.