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
Simon Sabin - 17 Nov 2007 14:07 GMT
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,
>
[quoted text clipped - 19 lines]
> Thanks
> ascll