matthew walker matthew walker - 2 months ago 4
SQL Question

Cannot figure out SQL Select Statement in Access 2016

I'm having some trouble understanding WHY a select statement isn't working in a query I'm making.

I've got the SELECT and FROM lines functioning. With just those, ALL results from my selected table are displayed - 517 or so

What I want to do is display results based on a pattern using LIKE - What I have so far

FROM Tbl_ServiceRequestMatrix
WHERE Tbl_ServiceRequestMatrix.[Application/Form] LIKE 'P%';

This returns 0 results - despite the fact that the coloum selected DOES have entries that start with 'P'

I also tried utilising brackets, see if that was the issue - still displays 0 results:

FROM Tbl_ServiceRequestMatrix
WHERE ((Tbl_ServiceRequestMatrix.[Application/Form])='p%');

Can any one help me understand why my WHERE ** LIKE statement is causing 0 results to be displayed??


The wildcard character in MS Access is (by default) * instead of %:

WHERE Tbl_ServiceRequestMatrix.[Application/Form] LIKE "P*"