mossmis
asked on
Converting Oracle Decode to SQL equivalent
I have a decode statement from an Oracle Report I am trying to translate into SQL server.
Here is the statement:
DECODE(RECEIPT_DATE, NULL, DECODE(DISP_DATE,NULL,DATE _SERIALIZE D,DISP_DAT E),RECEIPT _DATE) transfer_date
From what I researched, SQL's equivalent would be a case statement. This is what I got so far but is erroring out: "incorrent sytax near word case"
case
when RECEIPT_DATE is null then (
case when DISP_DATE is null then date_serialized
else DISP_DATE end)
else receipt_date end as transfer_date
Did I miss something?
Here is the statement:
DECODE(RECEIPT_DATE, NULL, DECODE(DISP_DATE,NULL,DATE
From what I researched, SQL's equivalent would be a case statement. This is what I got so far but is erroring out: "incorrent sytax near word case"
case
when RECEIPT_DATE is null then (
case when DISP_DATE is null then date_serialized
else DISP_DATE end)
else receipt_date end as transfer_date
Did I miss something?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER