How to filter on records with an asterix

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Believe it or not, my company places an asterix (*) after the name of any
account in our list of accounts (in SAP) that is no longer active. I need to
filter these accounts out of my query but I can't seem to do so using <> Like
"*" because that would just show all accounts. Any thoughts? Thanks!
 
SELECT tblTest.*
FROM tblTest
WHERE (((tblTest.TestText) Like "*[*]"));

Note the square brackets.
 
Do you mean you want to select / show these accounts in your Query datasheet
or you want to filter these accounts out and only present the active
accounts in the Query Datasheet?

If it is the first case, Brendan's answer applies. If it is the second case
(my guess), use Not Like rather than Like. Alernatively, I think you can
use:

WHERE (((tblTest.TestText) Like "*[!*]"));
 
Back
Top