Greetings,
I'm new in SQL and I would like to know whether this is "possible" in SQL or
not: -
Table_A
Field_A1, varchar
Field_A2, text
Field_A3, text
Table_B
Field_B1, varchar
Field_B2, text
Field_B3, text
Could we use T-SQL to show Field_A1 and Field_B1
IF
(ANY word in Field_A2 LIKE ANY word in Field_B2 OR Field_B3)
OR
(ANY word in Field_A3 LIKE ANY word in Field_B2 OR Field_B3)?
Kindly advise and I'm using SQL 2005 (SP2).
Thanks
ascll
Hello ascll,
Not easily.
The best you can do is to use the term extraction in SSIS to extract the
terms from A2 and then perform a lookup against each row in Field B2 etc.
The other option is to use a CLR function that converts the contents of Field_A2
into a regular expression which then is matched against Field_B2.
Neither are easy and will require quie an amount of time to develop.
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> Greetings,
> I'm new in SQL and I would like to know whether this is "possible" in
> SQL or not: -
> Table_A
> Field_A1, varchar
> Field_A2, text
> Field_A3, text
> Table_B
> Field_B1, varchar
> Field_B2, text
> Field_B3, text
> Could we use T-SQL to show Field_A1 and Field_B1
> IF
> (ANY word in Field_A2 LIKE ANY word in Field_B2 OR Field_B3)
> OR
> (ANY word in Field_A3 LIKE ANY word in Field_B2 OR Field_B3)?
> Kindly advise and I'm using SQL 2005 (SP2).
> Thanks
> ascll
2012年3月21日星期三
Full Text Search
标签:
database,
greetings,
microsoft,
mysql,
oracle,
ornot,
search,
server,
sql,
table_afield_a1,
text,
textfield_a3,
varcharfield_a2
订阅:
博文评论 (Atom)
没有评论:
发表评论