Skip to content
Advertisement

SQL CASE with CASE

I have a CASE stmt within CASE and the code is something like below: I need to achieve below condition But below code is not working. Can anyone correct this code?

Here If mgmt.id IS NOT NULL then status_fl should be set as ‘Y’, and If mgmt.id IS NULL then we need to check the condition If staff.No IS NOT NULL THEN update status_fl as ‘Y’ otherwise update status_fl as ‘N’. Thanks in advance.

Advertisement

Answer

Is the query below solve your issues ?

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement