This should be an easy one for you guys.
i have the following sql statement:
WHERE el_id IN ('192') AND (case when vw1.status = 'Shipped'
then vw2.amt IS NOT NULL else 1 end)
I am trying to use a case statement in my where clause but i get the error "Incorrect syntax near the keyword IS"
so is the status = 'Shipped the query should look like this:
WHERE el_id IN ('192') AND vw2.amt IS NOT NULL
What am i doing wrong?