-- (instead of where the columns are equal)
SELECT * FROM Table1 INNER JOIN Table2 ON Table1.col LIKE '%' + Table2.col + '%'
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
SELECT * FROM Table1 INNER JOIN Table2 ON Table1.col LIKE '%' + Table2.col + '%'
You need to create an account or log in to post comments to this site.
» MS SQL shrink log files for ... in sql mssql
» Retrieve MSSQL table informa... in sql server tsql mssql table microsoft column information properties sysproperties systables data type types length columns
» Scripting schema updates in ... in sql tsql database mssql schema update tables microsoft columns query scripting information_schema alter altering
» Limit equivelent for MSSQL in mysql sql mssql limit clause paging pagination paginating offset limitting
» Selecting different parts of... in time date sql timestamp mssql language query transact structured datetime parts part stamp only sub
» Fix orphaned users in MSSQL in users sql mssql microsoft data transact orphan orphaned user restore restoration restoring
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails