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....
mharcaisAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mbizupConnect With a Mentor Commented:
What data base are you using?  The wildcards differ.

MS Access:

Use LIKE:

SELECT Email
FROM Emails
WHERE (((Emails.Email) LIKE "*.pl*"));
0
 
mbizupCommented:
Use LIKE:

SELECT Email
FROM Emails
WHERE (((Emails.Email) LIKE "%.pl%"));
0
 
Ashish PatelCommented:
Use like instead of =
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
entceeCommented:
try

SELECT Email
FROM Emails
WHERE ((Emails.Email) LIKE '%.pl%');
0
 
Jinesh KamdarCommented:
SELECT Email
FROM Emails
WHERE (((Emails.Email) like "%.pl%"));
0
 
entceeCommented:
at least I was not the last person :)
0
 
mharcaisAuthor Commented:
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!
0
 
mharcaisAuthor Commented:
By the way, this query is for an Access 2003 database...
0
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
assuming ms access:

SELECT Email
FROM Emails
WHERE (((Emails.Email)LIKE "*.pl*"));
0
 
Jinesh KamdarCommented:
Are you sure its .pl and not .PL? Ignore case and see if u get anything.
0
 
mbizupCommented:
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
glad I could help, but I think at least a point split with mbizup who posted the same just above would have been fair?!
0
 
mharcaisAuthor Commented:
Sorry, mbizup, I missed that, apologies.

Is there a way to split the points now?
0
 
mbizupCommented:
Thanks, mharcais and a3!
0
All Courses

From novice to tech pro — start learning today.