Alias in a CASE Statement

  • AndrewSQLDBA

    SSC-Insane

    Points: 21827

    Hello Everyone

    Where does the Alias reside when using a CASE Statement?

    I have tried a couple places, after the column name, after the END statement, before the END statement. But I am still receiving an error.

    Thanks

    Andrew

  • Cory E.

    SSCertifiable

    Points: 7076

    show what you have so far, and the actual error.

    Case <column> when <value> then <value> else <value> end as <Alias>

    -- Cory

  • AndrewSQLDBA

    SSC-Insane

    Points: 21827

    I got it now.

    Thanks

    Andrew SQLDBA

  • Greesh

    Grasshopper

    Points: 13

    How ?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply