Reducing query results by using partial column words
Posted on 2012-03-27
Below is my functional SQL, but every time i try to use the Like function to retrieve results in a field that contain a specific set of words, it returns no data. Fields JOBTITLE & JOBCODE have words that contain APS and CPS and I want to retrieve only those fields. In some instances it is at the beginning and independent whereas other times it is integrated into the name. I thought it could be as simple as adding Like '%APS%' or '%CPS%' but anything i do, the query results are completely empty.
Below are some examples of the data in that field: APS Unit-M, Aps Gen/Fac Inves-M, CVSCPS01, INVCPS10, CPS Investigations
SELECT employeeinfo.LOGNAME, [First_Name] & " " & [Last_Name] AS EmployeeName, dragon.LastUser, dragon.TotalDuration, dragon.TimesRun, employeeinfo.DEPTNAME, employeeinfo.JOBTITLE, employeeinfo.JOBCODE, employeeinfo.REGION
FROM dragon INNER JOIN employeeinfo ON dragon.LastLoginName=employeeinfo.LOGNAME
WHERE (((dragon.LastUser) Is Not Null));