Length command with trailing spaces?

  • How can I get the length of a field including trailing spaces? Trying to see if my data was inputted with spaces afterward, e.g. 'My Data ', was going to just do a select with a LEN but the LEN description says it doesn't count trailing white space, so that would seem to defy the point.

  • Try DATALENGTH('My Data ')

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Thanks

  • You're welcome.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 4 posts - 1 through 3 (of 3 total)

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