I have the following query:
I want to select only those rows in which Pet<>0 and Cas<>0
When I execute the query I get the message "Enter Parameter Value" for Pet and Cas. If I do not have the WHERE the query executes correctly. WHAT AM I DOING WRONG? Help is appreciated.
Code:
SELECT "BRIEFED" as Type, T1.Name
iif((T2.a < Date and T2.b = "N" and T2.C <> "Y")1,0) as Pet
iif((T2.a < Date and T2.b = "N" and T2.C <> "Y" and T1.D = "Y"),1,0) as Cas
T1.Dp, T2.a, T2.b, T2.C, T1.D
FROM tblTrack as T1 INNER JOIN tblCdr as T2 ON T1.No = T2.No
WHERE NOT (Pet = 0 and Cas =0);
When I execute the query I get the message "Enter Parameter Value" for Pet and Cas. If I do not have the WHERE the query executes correctly. WHAT AM I DOING WRONG? Help is appreciated.