sorry brother
----- Original Message -----
From: "Patrick Delaney "
<mssqldba-ezmlmshield-x12606546.[Email address protected]
To: "LazyDBA Discussion" <[Email address protected]
Sent: Tuesday, February 28, 2006 3:46 PM
Subject: RE: query required
> Pawan - seeing as you were "introuble" and asked "plz do fast" do you
> think a thank you to Noble might be in order?
>
> Thanks
> Pat "Trouble Maker" Delaney
>
> -----Original Message-----
> From: Noble Mudenha
> [mailto:mssqldba-ezmlmshield-x41457112.[Email address protected]
> Sent: 27 February 2006 15:41
> To: LazyDBA Discussion
> Subject: RE: query required
>
> Oh alright
> Use this
> select [id], minvalue, Bharati, TouchTel, IndiComm,
> 'first' = case when Bharati = minvalue then 'Bharati'
> when TouchTel = minvalue then 'TouchTel'
> when IndiComm = minvalue then 'IndiComm'
> end,
> 'second' = case when ((Bharati between TouchTel and IndiComm) or
> (Bharati
> between IndiComm and TouchTel)) then 'Bharati'
> when ((TouchTel between Bharati and IndiComm) or (TouchTel
> between
> IndiComm and Bharati)) then 'TouchTel'
> when ((IndiComm between Bharati and TouchTel) or (IndiComm
> between
> TouchTel and Bharati)) then 'IndiComm'
> end,
> 'third' = case when ((Bharati > TouchTel) and (Bharati > IndiComm)) then
> 'Bharati'
> when ((TouchTel > Bharati) and (TouchTel > IndiComm)) then
> 'TouchTel'
> when ((IndiComm > Bharati) and (IndiComm > TouchTel)) then
> 'IndiComm'
> end
> from test0
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> Website : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
MS Sql Server LazyDBA home page