Skip to content
Advertisement

Condition inside a SQL Query

I want to create a query, that will show the word “Passed” if the DATEDIFF(so_date,actual_delivery) = 3 then show “Failed” if not. Can someone help me please?

Output

Advertisement

Answer

use case when

Or you can use if that you used (but there is little correction)

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