The script below generates a syntax error (missing operator). Can you help me? "Param1" can either be a "0" or "1".
select Bidders.* From Bidders where If (:Param1 = 1) Then Due > 0 and Left(Event,2) <> 12 Else Due = 0) and Left(Event,2) <> 12 End If order by Name
In order to fix the problem, I recommend you rewrite the query using the following code:
select Bidders.* From Bidders where (:Param1 = 1 and Due > 0 and Left(Event,2) <> 12) or (:Param1 <> 1 and Due = 0 and Left(Event,2) <> 12) order by Name;