Stripping Out Quotes

  • That's a good explanation, thank you

    I would still prefer that '' and ' ' were different, but I guess there is not much to do about it

  • The most likely reason (in my opinion) trailing blanks are ignored in comparisons is that you have fixed-length character fields.  If you're comparing a char(10) to a char(12) (or to a trimmed varchar) they would never be equal, unless you remembered to use RTRIM religiously.  It's easier to have the RTRIM be automatic.

    Not that it makes any real difference, but the wording I find in BOL is "trailing blanks are ignored", not that the shorter string is padded with blanks.

  • You might have a point when you say that "trailing blanks are ignored", rather than "the shorter string is padded with blanks". The first statement is simpler as it involves only the string itself. Furthermore, trailing blanks are also ignored when you calculate the length of a string: len('') = len(' ') = 0.

  • Hi Farrel,
    Do you not do the word shortening thing where you are from? 
    Bully - Bulldozer? 
    Ah well, just get the avatar set and have done with it 😉
    I do believe this thread has been answered......
    Have fun

    Steve

    We need men who can dream of things that never were.

Viewing 4 posts - 46 through 48 (of 48 total)

You must be logged in to reply to this topic. Login to reply