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
-----Original Message-----
From: Edwards Ed
[mailto:mssqldba-ezmlmshield-x5786251.[Email address protected]
Sent: Monday, February 27, 2006 2:56 PM
To: LazyDBA Discussion
Subject: RE: query required[Scanned]
He did say: "plz"! hehe.
-----Original Message-----
From: Mayank Agarwal
[mailto:mssqldba-ezmlmshield-x19089117.[Email address protected]
Sent: Monday, February 27, 2006 7:54 AM
To: LazyDBA Discussion
Subject: RE: query required[Scanned]
Very true ..... Seems like abuse of the facility
Regards,
Mayank Agarwal
CONFIDENTIALITY NOTICE
This e-mail transmission and any documents, files, or previous e-mail
messages appended or attached to it, may contain information that is
confidential or legally privileged. If you are not the intended
recipient, or a person responsible for delivering it to the intended
recipient, you are hereby notified that you must not read this
transmission and that any disclosure, copying, printing, distribution,
or use of the information contained or attached to this transmission is
STRICTLY PROHIBITED. If you have received this transmission in error,
please immediately notify the sender by telephone (+91.172.2299720) or
return e-mail message ([Email address protected] and delete the original
transmission, its attachments, and any copies without reading or saving
in any manner. Thank you.
-----Original Message-----
From: Hugh du Toit
[mailto:mssqldba-ezmlmshield-x96204084.[Email address protected]
Sent: Monday, February 27, 2006 6:12 PM
To: LazyDBA Discussion
Subject: RE: query required[Scanned]
Yes. "plz do fast" will guaranteed not get you fast results.
-----Original Message-----
From: Paul Ho [mailto:mssqldba-ezmlmshield-x25446067.[Email address
protected]
Sent: Monday, February 27, 2006 14:30 PM
To: LazyDBA Discussion
Subject: RE: query required[Scanned]
Geez, who's doing the work and who's getting paid here, no wonder it's
called lazydba
-----Original Message-----
From: Pawan Singh
[mailto:mssqldba-ezmlmshield-x73560504.[Email address protected]
Sent: February 27, 2006 7:06 AM
To: LazyDBA Discussion
Subject: query required
Hi Gurus,
plz help me out, i am introuble....
i have data like
ID MinValue Bharati TouchTel IndiComm
101 1 2 5
1
102 5 5 6
8
102 2 3 2
8
102 3 5 3
8
I need Like
ID MinValue Bharati TouchTel IndiComm
First Second Third
101 1 2 5
1 IndiComm Bharti TouchTell
102 5 5 6
8 Bharati TouchTell IndiComm
102 2 3 2
8 TouchTell Bharati IndiComm
102 3 8 3
5 TouchTell IndiComm Bharati
plz do fast
any input is appreciated
Thanks in advance..
Kind Regards,
Pawan Singh
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Please take a few minutes to provide feedback on the quality of service you
received. The Department of Education values your feedback as a customer.
Commissioner John L. Winn is committed to continuously assessing and
improving the level and quality of services provided to you by Department
staff. Simply use the link below. Thank you in advance for completing the
survey.
http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]
---------------------------------------------------------------------
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