mharcais
asked on
Search for a particular string
Hi,
My table is called Emails and the email field is called Email.
I want to run a query for all email addresses with a particular extension. Here's what I have (but it's not working), please assist:
SELECT Email
FROM Emails
WHERE (((Emails.Email)="%.pl%")) ;
When that didn't work, I tried this one:
SELECT Email
FROM Emails
WHERE (((Emails.Email)="#.pl#")) ;
Neither bring me back any results, though there are plenty of records matching this criteria....
My table is called Emails and the email field is called Email.
I want to run a query for all email addresses with a particular extension. Here's what I have (but it's not working), please assist:
SELECT Email
FROM Emails
WHERE (((Emails.Email)="%.pl%"))
When that didn't work, I tried this one:
SELECT Email
FROM Emails
WHERE (((Emails.Email)="#.pl#"))
Neither bring me back any results, though there are plenty of records matching this criteria....
Use like instead of =
try
SELECT Email
FROM Emails
WHERE ((Emails.Email) LIKE '%.pl%');
SELECT Email
FROM Emails
WHERE ((Emails.Email) LIKE '%.pl%');
SELECT Email
FROM Emails
WHERE (((Emails.Email) like "%.pl%"));
FROM Emails
WHERE (((Emails.Email) like "%.pl%"));
at least I was not the last person :)
ASKER
HI!
Blank.... draws nothing back.
I'm pulling my hair out here! IF I do a search for .pl as a part of the field in the table, I get tons, but within the query... NOTHING!
Blank.... draws nothing back.
I'm pulling my hair out here! IF I do a search for .pl as a part of the field in the table, I get tons, but within the query... NOTHING!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
By the way, this query is for an Access 2003 database...
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Are you sure its .pl and not .PL? Ignore case and see if u get anything.
mharcais,
I posted the same answer first...
https://www.experts-exchange.com/questions/22859899/Search-for-a-particular-string.html#19980109
I posted the same answer first...
https://www.experts-exchange.com/questions/22859899/Search-for-a-particular-string.html#19980109
glad I could help, but I think at least a point split with mbizup who posted the same just above would have been fair?!
ASKER
Sorry, mbizup, I missed that, apologies.
Is there a way to split the points now?
Is there a way to split the points now?
Thanks, mharcais and a3!
SELECT Email
FROM Emails
WHERE (((Emails.Email) LIKE "%.pl%"));