How to compare if two strings contain the same words in T-SQL for SQL Server 2008?

前端 未结 8 1236
长情又很酷
长情又很酷 2021-01-18 05:22

When I compare two strings in SQL Server, there are couple of simple ways with = or LIKE.

I want to redefine equality as:

If

8条回答
  •  醉酒成梦
    2021-01-18 06:02

    Scenario is as follows. You would want to use a TVF to split the first and the second strings on space and then full join the resulting two tables on values and if you have nulls on left or right you've got inequality otherwise they are equal.

提交回复
热议问题