• GSquared (5/21/2008)


    The quick answer is update the table using RTrim.

    update dbo.Table

    set Column = rtrim(Column)

    Since you're using Varchar data type, that will probably do it.

    If it doesn't, the thing to do is take a look at ANSI_PADDING in Books Online and start checking for that.

    G,

    I considered giving this answer as well, but I really want to know why queries are not returning data as in all my tests from the other thread I referenced in my first post, I could not get an equality operator to fail on a varchar column with trailing spaces. 'Jack' = 'Jack ' or 'Jack ' or 'Jack' if ANSI_PADDING was on or off. Based on those tests I would not expect trailing spaces to cause a problem, so I am thinking it might be a Case-Sensitive installation.