tsql - FullText Index - Searching values from another table -
is possible, in sql server 2008, using full text index syntax, run query such one?
select * table_to_search s, table_with_strings_to_search ss contains(s.whole_name,ss.first_name) or contains(s.whole_name,ss.last_name)
i need search first_name in table table_to_search, column whole_name has full text index on it. doesn't seem valid query though... there workaround using full text index search?
later edit:
here business case: each night downloading several websites information "blacklisted" individuals , insert table in format: wholename, lastname, firstname, middlename
. data chaotic wholename
not contain either last, first or middle name or wholename null while other 3 fields have values, or every of these 4 fields null , on. also, data may repeat 1 blacklisted individual may come 2+ of these websites. need compare data, chaotic is, against our customer data based on our customer's first
, last
name , give matching score (rank) against files download these websites.
first tried charindex
or like
operators couldn't create scoring algorithm based on , took 6 hours compare our customer's first , last name wholename
column table_to_search
table. thought perhaps implementing full_text index easier , faster ... apparently wrong.
has dealt task this? , if so, best approach?
after skimming http://technet.microsoft.com/en-us/library/ms187787.aspx , http://technet.microsoft.com/en-us/library/ms142571.aspx don't think possible search in way. not that, seems type of index wouldn't work names anyway.
if care checking 1 name have set values variables. method allow use full-text index.
otherwise, suggest splitting whole_name column (if there space or unique character between first , last name) , comparing each part other columns. if working huge data set, may want experiment doing @ temp table level , creating index.
good luck!
Comments
Post a Comment