If you are using SQL Server Enterprise Manager, you can get help on most of the TSQL language from the Query Analyzer.
On 1/25/07, Andy Matthews <[EMAIL PROTECTED]> wrote: > > Case isn't a function. It's a flow control statement. Just like doing a > cfswitch statement in CF. > > -----Original Message----- > From: Chad Gray [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 25, 2007 8:52 AM > To: CF-Talk > Subject: RE: SQL order by > > Thanks Jim! That works great for me! > > I will have to look up CASE, I am not familiar with that function. > > Thanks again! > > -----Original Message----- > From: Jim Wright [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 25, 2007 9:26 AM > To: CF-Talk > Subject: Re: SQL order by > > Chad Gray wrote: > > > > I cannot switch it to an integer field because there will be some text > also. > > > > Any way to accomplish this? > > > > maybe something like... > SELECT thefield FROM foo > ORDER BY CASE WHEN IsNumeric(thefield)=1 THEN CAST(thefield AS INT) ELSE 0 > END,thefield > > That should put the text fields at the beginning, sorted alphabetically, > and > the numeric fields at the end, sorted numerically. > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267610 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4