Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mlmeyer
Starting Member
26 Posts |
Posted - 2005-06-07 : 09:43:11
|
I have a table that has the fields CustID, CountA, CountB. I would like to have a query just return the CustID and the highest value between CountA and CountBso if this was the dataCustID......CountA.......CountB123.............10...............15234..............5................NULLI would like it to return this output:CustID.....MaxCount123..............15234...............5In Oracle I could just use the 'Greatest' function but how do I do it in MS SQL? |
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|