Home Forums SQL Server 2008 T-SQL (SS2K8) how to concatenate o as perfix in case statment ? RE: how to concatenate o as perfix in case statment ?

  • 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)?

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    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