Lafor
Nov 2nd, 2000, 11:06 AM
I have 2 tables with FName LName Address, City
Want to see whether one is a subset of the other
select count(*)
from firsttable
where Rtrim(Ltrim(Upper(LName))) + " " + Rtrim(Ltrim(Upper(FName))) + " " + Rtrim(Ltrim(Upper(Address1))) + " " + Rtrim(Ltrim(Upper(City)))
in (select
Rtrim(Ltrim(Upper(LName))) + " " + Rtrim(Ltrim(Upper
(FName))) + " " + Rtrim(Ltrim(Upper(Address1))) + " " +
Rtrim(Ltrim(Upper(City)))
from secondtblSingularsExtracted)
No primary key or anything..
How can we speed this up??
Any ideas welcome
Want to see whether one is a subset of the other
select count(*)
from firsttable
where Rtrim(Ltrim(Upper(LName))) + " " + Rtrim(Ltrim(Upper(FName))) + " " + Rtrim(Ltrim(Upper(Address1))) + " " + Rtrim(Ltrim(Upper(City)))
in (select
Rtrim(Ltrim(Upper(LName))) + " " + Rtrim(Ltrim(Upper
(FName))) + " " + Rtrim(Ltrim(Upper(Address1))) + " " +
Rtrim(Ltrim(Upper(City)))
from secondtblSingularsExtracted)
No primary key or anything..
How can we speed this up??
Any ideas welcome