everyone, I have looked for this one but haven’t found an answer yet. Basically the issue is as follows:
If I try to insert on a table that has a nonclustered unique index:
‘hi’
‘hi ‘
This will show a duplication error
‘hi’
‘ hi’
This will not show a duplication error.
I’ve already tried to put some LIKE ‘ %’ AND use REPLACE or LEFT function on the WHERE clause of the NONCLUSTERED INDEX and it didn’t worked obviously. So is there any way to pull this through? I wouldn’t like to have to use a trigger to check for this every time an INSERT/UPDATE is made.