Hey all,
The statement below is supposed to be pulling NO DUPLICATES in a new table called final_output. However, when I run it, it indeed populates the new table where multiple records could have the same name and address even though below I specify that name and address for every record must be unique:
Code:
SELECT DISTINCT fullName, addresses, ID INTO final_output
FROM (SELECT possibles.fullname, PrepareForDuplicateCheck.addresses, PrepareForDuplicateCheck.id FROM possibles, PrepareForDuplicateCheck WHERE INSTR(PrepareForDuplicateCheck.names_1, possibles.fullname) > 0 Or INSTR(PrepareForDuplicateCheck.names_2, possibles.fullname) > 0) AS [%$##@_Alias];
Any idea what's wrong?
Thanks for response.