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.
Using AND and OR
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Using AND and OR
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Using AND and OR
After extensive googeling I've come to the conclusion that the only way if to wright it like i rewrote it basically case1 and case2 or case1 and case3 or case1 and case4 and so on, And it works fine but I found a bug with livecode/windows 8.1 x64 The horizontal slider isn't working or I don't have it turned on maybe? maybe bump this post to the proper place for your programming department.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Using AND and OR
Use always brackets with more then one AND/OR:
Code: Select all
put "SELECT * FROM tracker WHERE (trackerjob='" & tJob & "' AND trackerfinalqcdate IS NULL) OR (trackerjob='" & tJob & "' AND trackercoating IS NULL)"
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w