UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Multiple Criteria To Exclude If Certain Text String Found, Access 2013    
 
   
bakersburg9
post Sep 10 2019, 11:40 AM
Post#1



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


I have a query that pulls in a field called “Job Name” and another field called "Description" – I’m trying to EXCLUDE from the results of my query anything that has the string “do not use” in the description, and also exclude any records that contain the text string “Rcls” – works great – but there are a small number of records that contain the text string “Reclass” – I swear I’ve tried everything as far as the Design View of the query on the Criteria line, and the “Or:” line – nothing works – I’ve tried putting "Note Like *Do not use*"" in the criteria for Job Name and below it on the “Or:” line and also not on the Or: line – every possible combination – plus I’ve tried: “Not In("*Rcls*" And Not Like "*reclass*") everything
CODE
SELECT CostZeroBilling_Q1toQ3_2017_19.Job, CostZeroBilling_Q1toQ3_2017_19.[Job Name], CostZeroBilling_Q1toQ3_2017_19.Description, CostZeroBilling_Q1toQ3_2017_19.amount FROM CostZeroBilling_Q1toQ3_2017_19 INNER JOIN LostJobsWithJobCost_2016_2019 ON CostZeroBilling_Q1toQ3_2017_19.Job = LostJobsWithJobCost_2016_2019.[Job Number]
WHERE (((CostZeroBilling_Q1toQ3_2017_19.[Job Name]) Not Like "*Do not use*") AND ((CostZeroBilling_Q1toQ3_2017_19.Description) Not Like "*Rcls*"));

Any help would be appreciated...
This post has been edited by bakersburg9: Sep 10 2019, 11:40 AM
Go to the top of the page
 
arnelgp
post Sep 10 2019, 12:06 PM
Post#2



Posts: 1,473
Joined: 2-April 09
From: somewhere out there...


CODE
SELECT CostZeroBilling_Q1toQ3_2017_19.Job, CostZeroBilling_Q1toQ3_2017_19.[Job Name], CostZeroBilling_Q1toQ3_2017_19.Description, CostZeroBilling_Q1toQ3_2017_19.amount
FROM CostZeroBilling_Q1toQ3_2017_19 INNER JOIN LostJobsWithJobCost_2016_2019 ON CostZeroBilling_Q1toQ3_2017_19.Job = LostJobsWithJobCost_2016_2019.[Job Number]
WHERE (((CostZeroBilling_Q1toQ3_2017_19.[Job Name]) Not Like "*Do not use*") AND ((InStr(1,[description],"Rcls"))=0) AND ((InStr(1,[description],"Reclass"))=0));

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    19th October 2019 - 02:46 PM