Hi Dave, Thanks for sticking with me on this. I tried your suggestion, but I get an error. I haven't used CASE before. Maybe, I'm not using the right syntax or left something out. Could you let me know? Here's the way the code is now in the query:
<CFIF sortOrderString neq ""> ORDER BY #sortOrderString# <CFELSE> ORDER BY CASE WHEN isNumeric(a.ClCo) CONVERT(numeric(8), a.ClCo) ELSE a.ClCo END </CFIF> Thanks Again, Lewis -----Original Message----- From: Dave Phillips <[EMAIL PROTECTED]> To: cf-newbie <[email protected]> Sent: Tue, 28 Oct 2008 11:54 am Subject: RE: Numerical order of query results Well, I'm not sure you can have it both ways. Either you sort it umerically, or alphabetically. Where would 01DEMO show up? The only thing I can think of trying is something like this: ORDER BY ASE WHEN isNumeric(getJobs.accountID) HEN convert(numeric(8),getJobs.accountID) LSE getJobs.accountID ND ----Original Message----- rom: Lewis Billingsley [mailto:[EMAIL PROTECTED] ent: Tuesday, October 28, 2008 10:39 AM o: cf-newbie ubject: Re: Numerical order of query results Dave, This solution actually turned out to be the best on another page because f how query results were delivered as an array to create table cells. But, now have another problem. One of the account numbers is called 01DEMO hich brings up the error that it can't be converted, so I have to find a ay to sort the numbers AND include 01DEMO. Is this possible??? Many Thanks, ewis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4096 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
