Sam OZ
asked on
sql server search a table field like another table field
I have two sql server 2016 tables Table1 , Table2 with a fled myName in both filed
How can have a query that looks a table1 myname like table2 myname
I tried table1.myName like '%' || table2.myName || '%' but that seems to be not correct
How can have a query that looks a table1 myname like table2 myname
I tried table1.myName like '%' || table2.myName || '%' but that seems to be not correct
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SQL Server uses + rather than || to do concatenation. This is throughout T-SQL. || has no meaning to SQL Server.