I have two tables tblA and tblB
tblA
==========
fdA | fdB | fdC
tblB
==============
fdA | fdD
I need to check if any fields in tblA contain a certain string but also concatenate a 2 fields together in two different tables ie
SELECT fdB + '' + fdD
FROM tblA a, tblB b
WHERE a.fdA = b.fdA
OR fdA like '%MYSTRING%'
OR fdB like '%MYSTRING%'
OR fdC like '%MYSTRING%'
The join in this query brings back a result for every row in tblB too however. What is the best way to achieve what I am trying to do?
tblA
==========
fdA | fdB | fdC
tblB
==============
fdA | fdD
I need to check if any fields in tblA contain a certain string but also concatenate a 2 fields together in two different tables ie
SELECT fdB + '' + fdD
FROM tblA a, tblB b
WHERE a.fdA = b.fdA
OR fdA like '%MYSTRING%'
OR fdB like '%MYSTRING%'
OR fdC like '%MYSTRING%'
The join in this query brings back a result for every row in tblB too however. What is the best way to achieve what I am trying to do?