CASE test
WHEN NULL and SUBSTR(('99999999' - Tst_Date),1,4) > 2009 THEN 'Medi'
WHEN NULL and SUBSTR(('99999999' - Tst_Date),1,4) < 2009 THEN 'hills'
ELSE test
END AS "Phy"
Am i missing something in the above case statement? I keep on getting 00905. 00000 - "missing keyword" error?
Your syntax is a little bit off. Use this:
CASE WHEN test IS NULL AND SUBSTR(('99999999' - Tst_Date),1,4) > 2009 THEN 'Medi'
WHEN test IS NULL AND SUBSTR(('99999999' - Tst_Date),1,4) < 2009 THEN 'hills'
ELSE test
END AS "Phy"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With