Also, if you're using SQL Server (or MySQL) this one's even easier: SELECT * FROM tmp ORDER BY ascii( c ) ASC
-----Original Message----- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 4:49 PM To: CF-Talk Subject: RE: Order by question Paul... What DBMS are you using? In MySQL 5, sorting a numeric column apparently defaults to sorting alphabetically. CREATE TABLE `tmp` ( `c` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO tmp (c) VALUES (1); INSERT INTO tmp (c) VALUES (101); INSERT INTO tmp (c) VALUES (101010); INSERT INTO tmp (c) VALUES (2); INSERT INTO tmp (c) VALUES (201); INSERT INTO tmp (c) VALUES (201010); INSERT INTO tmp (c) VALUES (201020); SELECT * FROM `tmp` ORDER BY c ASC -----Original Message----- From: Paul Ihrig [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 4:31 PM To: CF-Talk Subject: Re: Order by question Gerald they are nums in a num field they sort correctly if i wanted them sorted like a number. but powers that be want them sorted in a was to show hierarchy.. nm... i will tell them we can recreat the table with the order they want by hand... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302673 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4