• Sorry, I misread your original post to mean zero-length string not space.

    I am surprised I hadn't encountered that problem before so thanks for pointing it out. I have submitted an update that changes all the calls to LEN() to DATALENGTH(). That works fine since all of the characters are varchar and not nvarchar().


    Karen Gayda
    MCP, MCSD, MCDBA

    gaydaware.com