the closest I could get was select * from foo order by rpad(col, 10, '0') But it does not the results you're asking.
On Thu, Apr 3, 2008 at 4:49 PM, Andy Matthews <[EMAIL PROTECTED]> wrote: > 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:302671 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

