View Single Post

   
  #5 (permalink)  
Old 02-29-2008, 04:26 AM
N
 
Posts: n/a
Default Re: DECODE in SQL Server?"

David,

Sorry, I don't have books online. The examples I found on the site, none of
them used "END" in the statment.

Thanks a bunch! ^_____^
N


"David Portas" <REMOVE_BEFORE_REPLYING_dportas@acm.org> wrote in message
news:5MGdne_kiKNeKvzcRVn-gw@giganews.com...
> > What did I do
> > wrong?

>
> You didn't read-up on the syntax first! My reply was intended as an
> indication of something you should look up. You'll find Books Online is a
> great resource if you refer to it occassionally :-)
>
> SELECT CASE WHEN Assignment_Type = 'C' THEN 'Com' ELSE 'Do not know' END
> FROM ASSIGNMENT
>
> or
>
> SELECT CASE Assignment_Type WHEN 'C' THEN 'Com' ELSE 'Do not know' END
> FROM ASSIGNMENT
>
> --
> David Portas
> SQL Server MVP
> --
>
>



Reply With Quote