Forum Discussion
BADDULA
Mar 31, 2025Copper Contributor
Sql query with Wildcard search
I have two tables: Table1 and Table2. I want to retrieve records from Table2 that match a specific pattern in a column based on data from Table1.
- Apr 01, 2025
Should be easy:
SELECT * FROM Table1 AS T1 INNER JOIN Table2 AS T2 ON T1.ConvertColumn LIKE N'%' + T2.Refrence + N'%'
olafhelper
Apr 01, 2025Bronze Contributor
Should be easy:
SELECT *
FROM Table1 AS T1
INNER JOIN
Table2 AS T2
ON T1.ConvertColumn LIKE N'%' + T2.Refrence + N'%'