• bitbucket-25253 (7/31/2011)


    Even stranger, used NVARCHAR(max) and the behavior is completely different.

    I noticed that too, and it inspired me to search my code for any varchars and change them to nvarchars, just in case. Given the relatively small size of our database, there's little downside that I can see.

    I work in the US, so this didn't manifest itself until one of our Canadian customers reported that an import process from Access was taking a very long time. I couldn't reproduce the problem until I took the step of setting up a server with Canadian collation. Once I isolated that REPLACE() as the culprit, I knew I had a good QotD on my hands. 😉

    ron

    -----
    a haiku...

    NULL is not zero
    NULL is not an empty string
    NULL is the unknown