Yeah *that's* why I didn't suggest your more terse ELSE last_name  Yeah.
 That's the ticket.    ;-)

On Wed, Jun 30, 2010 at 3:13 PM, <b...@bradwood.com> wrote:

>
> Let's hope no one has a last name starting with any of the following
> characters:
>
> space ! " # $ % & ' ( ) * + , - . /
>
> All of those fall alphabetically before 0.
>
> :)
>
> ~Brad
>
> -------- Original Message --------
> Subject: RE: Order By question
> From: "Paul Alkema" <paulalkemadesi...@gmail.com>
> Date: Wed, June 30, 2010 3:06 pm
> To: cf-talk <cf-talk@houseoffusion.com>
>
>
> 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
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:334986
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to