Home Forums SQL Server 2012 SQL Server 2012 - T-SQL How to achieve "Full word match" value comes from source table column RE: How to achieve "Full word match" value comes from source table column

  • Luis Cazares (2/4/2016)


    What's wrong with LIKE operator if it does exactly what you're asking for?

    SELECT *

    FROM #Source s

    JOIN #result r ON ' ' + r.column_result + ' ' LIKE '% ' + s.Column_source + ' %'

    Further explanation: http://www.sqlservercentral.com/articles/T-SQL/130558/

    I does not pick the first value: '223 1'.

    Correction: It does, but only for a limited case of a single delimiter, blank space in this case.

    _____________
    Code for TallyGenerator