By the way, this is the error I get:
Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'CONVERT'. Also, you should know that this query is in a component, which is called by another component (if it makes any difference). I also tried this: <cfif a.ClCo EQ '01DEMO'> a.ClCo <cfelse> CONVERT(numeric(8), a.ClCo) </cfif> But, then got an error saying: "Element CLCO is undefined in A" I don't get it. It was defined when I didn't bother with the 'if" statement. Thanks, 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:4097 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
