|
-
July 16th, 2005, 05:14 AM
#1
Change in Order of records
Hi,
I am executing a query from Vb using ADO / Informix drivers to Informix server.
If I am running the same query on informix console I am getting records in a particular oder but If I am executing the same query from VB then the recordset that I am receving is coming in a seperate order than Informix.
Can anyone tell me how to resolve this problem.
Thanks & Regards,
Kedar
-
July 16th, 2005, 07:45 AM
#2
Re: Change in Order of records
The order will stay the same if you use the "ORDER BY" clause at the end of your query.
Code:
SELECT Thing_ID, Thing_Name, Thing_Date, Thing_etc
FROM Tb_Thing
WHERE Thing_col7 > 'foo'
ORDER BY Thing_date, Thing_Name
You can add the direction of the sort with the ASC and DESC keywords for ascending and descending order,
e.g. SELECT ... ORDER BY Thing_Date DESC, Thing_Name ASC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|