Jump to content

Delete using wildcards from another table.


Nelsonthekidd1

Recommended Posts

Hello All,I have got 2 tables.MainTbl is generated by others and d/l by me each month, it consists of general info... Co. Name, FirstName, LastName, Addr1, Addr2,...etc.

AddrTbl has 1 field... Addr, it has over 200 records and contains the addresses of competitors, lawyers,etc, that I don't want to mail to.MainTbl.Addr1 from month to month has duplicate address but the spelling varies , 1234 S. 4th St. could be 1234 South 4th Street the next month.I created AddrTbl using a * (wildcard.) in parts of the addresses, 1234 S* 4th St* . I also tried to duplicate the table using % inplace of *.

One of many variations I have used, without success...DELETE *FROM MainTblINNER JOIN Addrtbl ON MainTbl.Addr1 = AddrTbl.AddrWHERE (MainTbl.Addr1 LIKE AddrTbl.Addr);

 

Using MS Access 2010Any help is greatly appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...