Hey all,

I don't have flexibility with this. The names I am trying to match with superfluous can either be in one of four fields in contacts table. And because all names in those four fields go together - since they all have same address - they must all be part of the same record. So I am wondering if it is possible to do this in access to avoid a cartesian product:

Code:
SELECT contacts.id, contacts.names_1, contacts.names_2, contacts.addresses INTO Extras2 
FROM contacts, superfluous
Where superfluous.fullName = contacts.name_1 or contacts.name_2 or contacts.name_3 or contacts.name_4
(
( 
(INSTR(CONTACTS.NAMES_1, superfluous.fullname) > 0) 
Or
(INSTR(CONTACTS.NAMES_2, superfluous.fullname) > 0) 
) 
or
(
InStr([contacts.names_1],",")<>"0" And InStr([contacts.names_1],"&")<>"0"
or
InStr([contacts.names_2],",")<>"0" And InStr([contacts.names_2],"&")<>"0"
)
)
Another problem I am having this right here:
Code:
(
InStr([contacts.names_1],",")<>"0" And InStr([contacts.names_1],"&")<>"0"
or
InStr([contacts.names_2],",")<>"0" And InStr([contacts.names_2],"&")<>"0"
)
when querying through 730,000 records, access gives error "Cannot open database. It may not be a database your application recognizes, or the file may be corrupt." This happens despite only querying a single table.