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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 CASE Function: it powers in practical scriptings

Author  Topic 

johnsql
Posting Yak Master

161 Posts

Posted - 2006-04-24 : 10:58:28
I read BOL for CASE function (SQL Server Scriptings). But it seems the information is mentioned short; also CASE examples in BOL are not many.
I'd like to know all other possible/flexible usages of CASE in reality and practical real life SQL scriptings. For example, in BOL, CASE use combined with SELECT statements. Some experienced scripters say it can be used combined with WHERE clause as well.
Thanks in advance.

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-04-24 : 11:01:58
Each of these has 2 good examples :
http://www.sqlteam.com/item.asp?ItemID=2209
http://www.sqlteam.com/item.asp?ItemID=2077

Edit: Added some more
http://www.sqlteam.com/item.asp?ItemID=922
http://www.databasejournal.com/features/mssql/article.php/1460001

Srinika
Go to Top of Page

johnsql
Posting Yak Master

161 Posts

Posted - 2006-04-25 : 15:50:31
Srinika,
Thanks so much for your kind instructions of online articles about CASE usages. I really enjoy those excellent articles. After going thru them, I just wonder, for Microsoft SQL Server designers, why do they not write or document so much about flexible usages of CASE in the BOL? It is clear that if I just read only BOL of SQL Server Help and SQL Server Books which I buy, they do not have so much.
Anyway, thru Internet articles you show me, I learn a lot compared with what I read from BOL and books.
Best Regards,
Johnsql
Go to Top of Page
   

- Advertisement -