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_SERIALIZED,DISP_DATE),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"
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?