Click here to Skip to main content
15,917,062 members

Comments by Kevheathfield (Top 2 by date)

Kevheathfield 25-Apr-19 4:12am View    
Hmm, I can run this on a MySql instance..
Here is my last ditch attempt, please keep in mind that this is not optimal, but based on the column names in the question, I am under the assumption that this is for a home project.

select * from tablenm
WHERE(cal1 = 'true' AND CalStatu1 = 'Done' and cal1 = 'true')
OR  (cal1 != 'true' AND CalFinal = 'True'));
Kevheathfield 25-Apr-19 2:23am View    
My apologies, I realized there is syntax I missed. (A bit hard without an IDE)

Please try;
select * from TableNm
where CASE WHEN cal1 = 'true' THEN 
CalStatu1 = 'Done' and cal1 = 'true' else CalFinal = 'True' END