I am attempting to pull in information from our Lotus Notes database into Excel and have been successful. Now I'm trying to pull in only the data based on certain criteria. In my code below I need to have the Entity = "AMK" I need to have the Line_Reject = "1" and the CQARNumber needs to have the year 2007 or 2006 or 2005 in it. I'm sure it's an easy solution for the experts but I don't do a whole lot of these type Queries.
Here's the code
strSQL = strSQL & " WHERE (C.Entity='AMK' AND C.LineReject='1'"
strSQL = strSQL & " AND C.CQARNumber LIKE '2007%'"
strSQL = strSQL & " OR C.CQARNumber LIKE '2006%'"
strSQL = strSQL & " OR C.CQARNumber LIKE '2005%')"
Any help would be Awesome!!! Thanks.
Here's the code
strSQL = strSQL & " WHERE (C.Entity='AMK' AND C.LineReject='1'"
strSQL = strSQL & " AND C.CQARNumber LIKE '2007%'"
strSQL = strSQL & " OR C.CQARNumber LIKE '2006%'"
strSQL = strSQL & " OR C.CQARNumber LIKE '2005%')"
Any help would be Awesome!!! Thanks.