Results 1 to 2 of 2

Thread: Equivalen MSSQL Syntax

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Answers
    2

    Question Equivalen MSSQL Syntax

    what is the equivalent syntax in MSSQL for DECODE() in Oracle?


  2. #2
    Expert Member
    Join Date
    Sep 2006
    Answers
    477

    Re: Equivalen MSSQL Syntax

    You will have to use case statement for that. There is no decode in MS SQL.
    Here 's the syntax.

    CASE input_expression
    WHEN when_expression THEN result_expression
    [ ...n ]
    [
    ELSE else_result_expression
    ]
    END
    Searched CASE function:
    CASE
    WHEN Boolean_expression THEN result_expression
    [ ...n ]
    [
    ELSE else_result_expression
    ]
    END

    If you want more info on this, visit the following link.
    MSDN Link

    Cheers!
    Kalayama

    [COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

    Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact