Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: How to find...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 6 Topic 10983 of 11334
Post > Topic >>

Re: How to find records with length greater than 17

by Gert-Jan Strik <sorry@[EMAIL PROTECTED] > Apr 23, 2008 at 06:46 PM

ciojr@[EMAIL PROTECTED]
 wrote:
> 
> On Apr 21, 3:36 pm, "Plamen Ratchev" <Pla...@[EMAIL PROTECTED]
> wrote:
> > 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 Ratchevhttp://www.SQLStudio.com
> 
> Right - i dont want to include spaces.
> I want to check where the first word is greater than 17

It won't do that. For example, the query above will also select the row
where namecol has a value of 'John Smithersonson'

So if Plamen's solution does not do what you want, then please some
example data and desired output.

-- 
Gert-Jan
 




 6 Posts in Topic:
How to find records with length greater than 17
ciojr@[EMAIL PROTECTED]   2008-04-21 12:07:07 
Re: How to find records with length greater than 17
"Plamen Ratchev"  2008-04-21 15:36:18 
Re: How to find records with length greater than 17
"John Sheppard"  2008-04-22 16:23:33 
Re: How to find records with length greater than 17
"Plamen Ratchev"  2008-04-22 08:34:56 
Re: How to find records with length greater than 17
ciojr@[EMAIL PROTECTED]   2008-04-22 09:15:08 
Re: How to find records with length greater than 17
Gert-Jan Strik <sorry@  2008-04-23 18:46:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Aug 29 7:18:25 CDT 2008.