Link to home
Start Free TrialLog in
Avatar of slamhound
slamhound

asked on

Inner Join Uppercased Text Fields

I'm running a query to clean up unsubscribed email addresses. I have a "remove" list and I have the customer list. I'm using an inner join to link the two lists (tables) and then remove the email address from the customer so they don't receive more emails.

How can I handle it if the capitolisation is different from the Remove list to the Customer list?
Is there a way of forcing both lists to upper or lowercase so that I get a match no matter how the email address was entered?

PS: Running Access front end with a few local tables but most via an ODBC link to the SQL server.
ASKER CERTIFIED SOLUTION
Avatar of CutSack
CutSack

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slamhound
slamhound

ASKER

I'm using an Access query so I tried your LCase example but it's taking ages to run. The customer file (on SQL) is quite large but the unsubscribe list (Access) is quite small.

Is there any way to speed this process up?
The qurey below might be quicker (although I' not sure if the syntax is valid in access) - the conversion to lower case is already done before the join.

If not , you might need an index on the email field in the SQL table if it is taking a long time.


Select * 
from (select lcase(email) as lemail from sqlcust) as scust
inner join (select lcase(email) as lemail from accesscust) as acust
on scust.lemail = acust.lemail

Open in new window