extracting characters from a text string

lmp101010

Registered User.
Local time
Today, 01:52
Joined
Feb 18, 2009
Messages
26
Hello,

I am attempting to write a query that will extract the first two characters in a text string by specifying a certain field return only values beginning "US." Here is the sql view of the query I'm writing.

SELECT Clicks.[Unique click], Failures.[Unique fail], Clicks.[Mailing Name], Failures.[Mailing Name]
FROM Clicks INNER JOIN Failures ON Clicks.Serial=Failures.Serial
WHERE (((Failures.[Mailing Name])='US%'));

This is not returning any results as it should. Any suggestions?
 
In a query, use "*" as the wildcard instead of "%".
 
Actually I did try that as well. No luck there I've posted a sample of the data I am attempting to extract. Any ideas?
 

Attachments

Sorry, you also need to replace "=" with Like:

WHERE (((Failures.[Mailing Name]) Like 'US*'));
 
Thats great, thanks Paul. I'm sort of a beginner with the code so that was very helpful. :)
 
No problem; I should have noticed the Like/= thing right off. Welcome to the site by the way.
 

Users who are viewing this thread

Back
Top Bottom