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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
ASKER
Is there any way to speed this process up?