Quantcast
Channel: Recent Edits
Viewing all articles
Browse latest Browse all 12198

Collation Caveat

$
0
0
Pattern "cannot be an empty string ('')" - that's wise. However, it can *effectively* be an empty string under the applicable collation. Such a pattern will counter-intuitively not match anything and not throw an error or even a warning. Therefore, REPLACE(text,NCHAR(0),N'') will NOT work as expected in most situations. REPLACE(text,NCHAR(0) COLLATE Latin1_General_BIN,N'') will.

Viewing all articles
Browse latest Browse all 12198

Trending Articles