Can you please help me out with the below query?
I need to extract from column VAL_DT
only items with date older than today's date but this rule should not apply to items that contain the following wordings in column MVT_DS
: "NOSTRO", "SCREV", "SCRIN", "MAN".
here is my attempt
SELECT * FROM table_name
WHERE VAL_DT < CURRENT DATE IF MVT_DS <> 'NOSTRO' AND MVT_DS <> 'SCREV' AND MVT_DS <> 'SCRIN' AND MVT_DS <> 'MAN'
IF
is invalid in theWHERE
clause. See if you can use the logicalOR
somehow.