I have the following query, it works fine but need to extend it a little
The query looks at strshort and where the clients share the same strshort description it returns the rows (essentially its matching client codes)
There are some exceptions in this case its "XC90 VOR PREMIUM" it will never get into the rows as that client used an abbreviation of VOR. to fix that I created a new table called TblShortDescLink
Ive manually made the links in this table by making strcommon
I would like to include the strshort from the third table where a.strshort =thirdtable.strcommon
I am not sure how to do that.
SELECT a.Strshort, a.ClientName, a.ClientCode
FROM TblWords A
JOIN TblWords B
ON A.StrShort = B.StrShort
AND A.ClientName <> B.ClientName
where a.Strshort like'xc90%Ocean%' --and a.ClientName='Smmt'
group by a.Strshort, a.ClientName, a.ClientCode
order by a.StrShort, a.ClientName, a.ClientCode