Using AND and OR
Posted: Fri Feb 14, 2014 8:00 pm
I think I know you are doing to tell me to do this the long way but I thought Id ask anyway
here is my code and it doesn't do what I want
put revQueryDatabase( theConnectionID, "SELECT * FROM tracker WHERE trackerjob='" & tJob & "' and trackerfinalqcdate IS NULL or trackercoating IS NULL") into theCursor
what it is doing is this (job and finalqcdate) or coating
what I want is (job and finalqcdate) or (job and coating)
so I"m guessing I'm going to have to rewrite like this
put revQueryDatabase( theConnectionID, "SELECT * FROM tracker WHERE trackerjob='" & tJob & "' and trackerfinalqcdate IS NULL or trackerjob='" & tJob & "' and trackercoating IS NULL") into theCursor
I'm OK with this if its the best way to do it, however thought Id ask just in case because I have 19 columns to check for empty cells and would be a long script.
here is my code and it doesn't do what I want
put revQueryDatabase( theConnectionID, "SELECT * FROM tracker WHERE trackerjob='" & tJob & "' and trackerfinalqcdate IS NULL or trackercoating IS NULL") into theCursor
what it is doing is this (job and finalqcdate) or coating
what I want is (job and finalqcdate) or (job and coating)
so I"m guessing I'm going to have to rewrite like this
put revQueryDatabase( theConnectionID, "SELECT * FROM tracker WHERE trackerjob='" & tJob & "' and trackerfinalqcdate IS NULL or trackerjob='" & tJob & "' and trackercoating IS NULL") into theCursor
I'm OK with this if its the best way to do it, however thought Id ask just in case because I have 19 columns to check for empty cells and would be a long script.