Let's say we have a string such as
AABBCCDDEEFFGG
It contains 7 sub-strings
AA BB CC DD EE FF GG
Now let's reorganize the order as long as the new string contains the sub-strings, then we think that they are equal. The new string is
AACCFFGGEEBBDD
It just was changed the order as
AA CC FF GG EE BB DD
I have many combinations from sub-strings. Each sub-string has exactly two chars. How can I compare the long string as same in stored procedure? Let say the old string is from database, the new one is from input parameter.