Quantcast
Channel: Answers for "Problem with CASE Statement in T-SQL"
Browsing latest articles
Browse All 4 View Live

Answer by Squirrel 1

you should be using IF . . ELSE for flow control not CASE .. WHENCASE .. WHEN is to use within a QUERY

View Article



Answer by Piotr Rodak

You can't mix assignment with output in CASE statement.You can print the output basing on the value of the @n variable using following syntax for example:declare @n int set @n = 1 print CASE when @n=1...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images