Albertoim


I know i can do a "IF" using expressions, the question is, can i do a CASE

Thanks!




Re: Do a CASE with a expression

EWisdahl


Albertoim,

It doesn't appear that there is a case statement in the expression syntax. Note, however, that depending on what you would like to do the Conditional split can be used in such a fashion (where you would then have another derived column for each of your cases and then a union all). And, of course, you can nest the if / else statements to mimic the case statement (although it looks awful and begins to be a bit difficult to maintain if you start to get to many cases).

If you do a bit of a search around the forums...

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=72088&SiteID=1





Re: Do a CASE with a expression

desibull

I would rather do my CASE expressions in SQL if there are many of them. The Dervied Column expression box cannot be expanded and it can get confusing even for a moderately complex logic.