SQL Server Performance

Decode in SQL Server

Discussion in 'General Developer Questions' started by kate_for_u, Sep 2, 2003.

  1. kate_for_u New Member

    Hi

    In Oracle we have a function DECODE

    Do we have an equivalent of this in SQL Server 2000

    Thanx in Advance
  2. Twan New Member

    I think you mean the case statement

    select case exp when val1 then val2 when val3 then val4 else val5 end

    or

    select case when exp1=val1 then vals when exp2=val3 then val4 else val5 end

    Cheers
    Twan

Share This Page