|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Compare subsetsHello,
Does anybody know how to compare the subsets of two columns on different tables? We have a column A in Table A that we want to compare any 10 characters to column B in Table B. Does anybody know the code to do this? Thanks You can join tables using the LIKE comparison operator, but it will result
in a table scan. select TableA.* from TableA join TableB on TableB.B like '%' + TableA.A + '%' Show quote "Neo" <N**@discussions.microsoft.com> wrote in message news:702ADF0A-B0B2-4E27-B159-87723E8BBD8E@microsoft.com... > Hello, > Does anybody know how to compare the subsets of two columns on different > tables? We have a column A in Table A that we want to compare any 10 > characters to column B in Table B. Does anybody know the code to do this? > > Thanks |
|||||||||||||||||||||||