Hi, I'm sure this is a simple question but it has bedeviled me this afternoon. I am assembling a database for a client that involves some inspection efforts at several hundred locations around the county. We have completed inspections and are now looking at ways to parse the data to make sure our recommendations to the client are targeting the most critical deficiencies. We are in the prioritization phase and am looking to apply multiple criteria to a query. I added one criteria and it worked perfectly, when I added another criteria, it's not being recognized and I'm seeing essentially the same data set as the first query. Here is the SQL statement:
SELECT [Table1].CRS01, [Table1].[Street 1], [Table1].[Street 2], Table2.GD04, [Table1].AnchorBoltsComment, Table3.CS02
FROM Table3 INNER JOIN (Table1 LEFT JOIN Table2 ON [Table1].NumBolts = Table1.NumAnchBoltsCode) ON Table3.CvrInspCode = [Table1].TeamLead
WHERE ((([Table1].TeamLead)=1) AND (([Table1].AnchorBoltsComment) Like "*unable*") AND (([Table1].InspReqd2015)=Yes)) OR ((([Table1].AnchorBoltsComment) Like "*not*"))
ORDER BY [Table1].CRS01;
For this exercise, I ran into the issue when I added the WHERE ([Table1].TeamLead) = 1 statement. The other WHERE clause, where I was fishing for specific text in the comments, worked fine.
Thanks for your time!
SELECT [Table1].CRS01, [Table1].[Street 1], [Table1].[Street 2], Table2.GD04, [Table1].AnchorBoltsComment, Table3.CS02
FROM Table3 INNER JOIN (Table1 LEFT JOIN Table2 ON [Table1].NumBolts = Table1.NumAnchBoltsCode) ON Table3.CvrInspCode = [Table1].TeamLead
WHERE ((([Table1].TeamLead)=1) AND (([Table1].AnchorBoltsComment) Like "*unable*") AND (([Table1].InspReqd2015)=Yes)) OR ((([Table1].AnchorBoltsComment) Like "*not*"))
ORDER BY [Table1].CRS01;
For this exercise, I ran into the issue when I added the WHERE ([Table1].TeamLead) = 1 statement. The other WHERE clause, where I was fishing for specific text in the comments, worked fine.
Thanks for your time!