When I compare two strings in SQL Server, there are couple of simple ways with =
or LIKE
.
I want to redefine equality as:
If
You can add a precomputed column in the base table that is evaluated in INSERT/UPDATE trigger (or UDF default) that splits, sorts and then concatenates words from the original column.
Then use = to compare these precomputed columns.
I don't think there is a simple solution for what you are trying to do in SQL Server. My first thought would be to create a CLR UDF that:
If this is a route you'd like to go, take a look at this article to get started on creating CLR UDFs.