I am having a problem figuring the AND/OR logic in this query.
This is partly to learn the boolean logic better and to create a query to clean up the tracking Table.
Sample output.
I was trying to get the script to output all rows where
BoxNumber, FileNumber, TrackingDate are either empty or null.
As seen in the output the FileNumber and BoxNumber are not empty or Null.
Where have I gone wronge in the Where clause?
Thanks
John Fuhrman
This is partly to learn the boolean logic better and to create a query to clean up the tracking Table.
Code:
Select
Tracking_ID, EmployeeID, MachineName, BoxNumber, FileNumber, TrackingDate, Reship, BoxNumberOriginal
from tblTrackingTable
Where
BoxNumber = '' OR BoxNumber Is Null
AND
FileNumber = '' OR FileNumber Is Null
AND
TrackingDate = '' OR TrackingDate Is Null
Sample output.
Code:
34 NULL NULL 1Z1A1230355615215 .BOX.END. NULL NULL NULL
35 NULL NULL 1Z1A123R0355615215 .BOX.END. NULL NULL NULL
36 NULL NULL 1Z1A1230355615215 .BOX.END. NULL NULL NULL
I was trying to get the script to output all rows where
BoxNumber, FileNumber, TrackingDate are either empty or null.
As seen in the output the FileNumber and BoxNumber are not empty or Null.
Where have I gone wronge in the Where clause?
Thanks
John Fuhrman