B
bdehning
I currently have the following SQL which works fine but requires me to enter the whole Servicing Division such as Henderson.
How do I add Like[Enter Servicing Division] & "*" without getting sytax errors so I can type only a patial name such as Hen to pull it up.
SELECT [SERVICE CALL NUMBER],[ACCOUNT NAME],[ASSIGNED CONSULTANT],[COUNTOFASSIGNED CONSULTANT],[LOCATION SERVICING DIVISION],[POLICY NUMBER],[SCHEDULED SERVICE MONTH],[LOCATION ADDRESS],[LOCATION CITY],[LOCATION STATE],[ORIGINAL SERVICE CALL DATE],[EXPIRATION DATE],[COMMENTS],[SERVICE CALL TYPE],[EAP],[COUNTOFSCHEDULED SERVICE MONTH]
FROM[TOTAL OUTSTANDING SERVICE CALLS BY CONSULTANT]
WHERE(([SCHEDULED SERVICE MONTH] >[RESCHEDULED SERVICE MONTH] OR [RESCHEDULED SERVICE MONTH] IS NULL) and [Location Servicing Division] =[Enter Servicing Division])
UNION ALL SELECT [SERVICE CALL NUMBER],[ACCOUNT NAME],[ASSIGNED CONSULTANT],[COUNTOFASSIGNED CONSULTANT],[LOCATION SERVICING DIVISION],[POLICY NUMBER],[RESCHEDULED SERVICE MONTH],[LOCATION ADDRESS],[LOCATION CITY],[LOCATION STATE],[ORIGINAL SERVICE CALL DATE],[EXPIRATION DATE],[COMMENTS],[SERVICE CALL TYPE],[EAP],[COUNTOFSCHEDULED SERVICE MONTH]
FROM[TOTAL OUTSTANDING SERVICE CALLS BY CONSULTANT]
WHERE([RESCHEDULED SERVICE MONTH] >[SCHEDULED SERVICE MONTH] and [Location Servicing Division] =[Enter Servicing Division]);
How do I add Like[Enter Servicing Division] & "*" without getting sytax errors so I can type only a patial name such as Hen to pull it up.
SELECT [SERVICE CALL NUMBER],[ACCOUNT NAME],[ASSIGNED CONSULTANT],[COUNTOFASSIGNED CONSULTANT],[LOCATION SERVICING DIVISION],[POLICY NUMBER],[SCHEDULED SERVICE MONTH],[LOCATION ADDRESS],[LOCATION CITY],[LOCATION STATE],[ORIGINAL SERVICE CALL DATE],[EXPIRATION DATE],[COMMENTS],[SERVICE CALL TYPE],[EAP],[COUNTOFSCHEDULED SERVICE MONTH]
FROM[TOTAL OUTSTANDING SERVICE CALLS BY CONSULTANT]
WHERE(([SCHEDULED SERVICE MONTH] >[RESCHEDULED SERVICE MONTH] OR [RESCHEDULED SERVICE MONTH] IS NULL) and [Location Servicing Division] =[Enter Servicing Division])
UNION ALL SELECT [SERVICE CALL NUMBER],[ACCOUNT NAME],[ASSIGNED CONSULTANT],[COUNTOFASSIGNED CONSULTANT],[LOCATION SERVICING DIVISION],[POLICY NUMBER],[RESCHEDULED SERVICE MONTH],[LOCATION ADDRESS],[LOCATION CITY],[LOCATION STATE],[ORIGINAL SERVICE CALL DATE],[EXPIRATION DATE],[COMMENTS],[SERVICE CALL TYPE],[EAP],[COUNTOFSCHEDULED SERVICE MONTH]
FROM[TOTAL OUTSTANDING SERVICE CALLS BY CONSULTANT]
WHERE([RESCHEDULED SERVICE MONTH] >[SCHEDULED SERVICE MONTH] and [Location Servicing Division] =[Enter Servicing Division]);