I secont John's SQL. To expand explain further see my example.

SELECT *
FROM   folks
ORDER  BY CASE
                WHEN last_name = 'Smith'
                        OR last_name = 'Jones' THEN 0
            ELSE last_name
          END  

Paul Alkema
http://paulalkema.com/


-----Original Message-----
From: John M Bliss [mailto:[email protected]] 
Sent: Wednesday, June 30, 2010 3:09 PM
To: cf-talk
Subject: Re: Order By question


Something like...

select last_name
from table
order by
case ID
when #ID1# then 0
when #ID2# then 0
else 1
end,
last_name

On Wed, Jun 30, 2010 at 2:02 PM, Les Mizzell <[email protected]> wrote:

>
> Not 100% sure how to do this...
>
> Need to return a list of folks ordered by last_name (no problem), EXCEPT
> for 2 of them. They need to be LAST regardless of their last names
> (problem)...
>
> Perhaps something with their 2 ID numbers?
>
> Ideas?
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 5241 (20100630) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334982
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to