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 |
|
demonickat
Starting Member
4 Posts |
Posted - 2010-06-22 : 11:02:09
|
| Hi,I am trying to use a CASE in my WHERE clauseI have the clause like thisAND CASE @Report WHEN 'COV' THEN 'CBTY'WHEN 'BRO' THEN 'BTYTR' END = @ReportBasically I am passing a parameter through as I want it to report on different types of regions depending on what is in @reportIs my logic correct? It should bring back rows, i.e if I do AND Report = 'CBTY' it brings back 95 rows. However once I use the CASE statement it brings nothing back.Thanks |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2010-06-22 : 11:27:03
|
| Nope, that doesn't make any logical sense. Unless you made a typo. Is the last @Report just supposed to be Report, as in Report the column? |
 |
|
|
|
|
|