ravi@sql (5/9/2013)
ya i agree but thats what my requirment .. any other way to over come this ?
CASE can only return one data type.
An ordinary column can only have one data type (ignore geography and other exotic types for the moment).
What data type do you want your output to be? What's wrong with VARCHAR(2)?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden