mmoutadayne
Programmer
Hello All,
I have a table of ~5,000,000 records (ID, name, title) and a second table of ~2,000,000 records (ID, name, title).
What i need to do is return the ID's from the first table where there is no exact match with a name/title in the second table. So if a row in table 1 is (3, Tom, Arnold) and there is a row in table 2 (5, Tom, Arnold)... I would NOT return 3.
Conversly, if there is no row in table 2 with name=Tom, title=Arnold then I WOULD return 3.
But, when i say exact match I mean a match that ignores case and removes trailing white space. So " ToM" = "tom"
I know how to do this matching but the way in which I would do it would take FOREVER to run... I was wondering if anyone has any idea on how to write a lightning fast query to complete this objective
The String columns (name, title) are Varchars so I think this means i cannot use the Match keyword?
Please help
Lots of advance thanx,
Mohamed
I have a table of ~5,000,000 records (ID, name, title) and a second table of ~2,000,000 records (ID, name, title).
What i need to do is return the ID's from the first table where there is no exact match with a name/title in the second table. So if a row in table 1 is (3, Tom, Arnold) and there is a row in table 2 (5, Tom, Arnold)... I would NOT return 3.
Conversly, if there is no row in table 2 with name=Tom, title=Arnold then I WOULD return 3.
But, when i say exact match I mean a match that ignores case and removes trailing white space. So " ToM" = "tom"
I know how to do this matching but the way in which I would do it would take FOREVER to run... I was wondering if anyone has any idea on how to write a lightning fast query to complete this objective
The String columns (name, title) are Varchars so I think this means i cannot use the Match keyword?
Please help
Lots of advance thanx,
Mohamed