View Single Post

   
  #3 (permalink)  
Old 04-24-2008, 06:07 PM
John Sheppard
 
Posts: n/a
Default Re: How to find records with length greater than 17


"Plamen Ratchev" <Plamen@SQLStudio.com> wrote in message
news:t9ednRsfVu9McZHVnZ2dnUVZ_jSdnZ2d@speakeasy.ne t...
> The LEN function returns the number of characters excluding trailing
> blanks:
>
> SELECT namecol
> FROM Foo
> WHERE LEN(namecol) > 17;
>
> The DATALENGTH function returns the number of bytes.
>
> HTH,
>
> Plamen Ratchev
> http://www.SQLStudio.com


Wouldnt it matter if the field was in unicode then? What do you do if you
want to include the spaces?

I dont really want to know I just thought it weird that len would behave
like that...(Im an SQL server noob)

John Sheppard


Reply With Quote