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 > Oracle Miscellaneous > Re: find word g...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 6853 of 7280
Post > Topic >>

Re: find word greater than 17

by Peter Nilsson <airia@[EMAIL PROTECTED] > Apr 23, 2008 at 07:58 PM

ci...@[EMAIL PROTECTED]
 wrote:
> i am looking to find the first word of a field greater than 17

Some data examples would be useful.

> select businessname
> from tablename
> where
> CHAR(' ', businessname + ' ') > 17

  -- field length > 17
  where length(trim(businessname)) > 17

or...

  -- has any (space delimited) word of length > 17
  select regexp_substr(businessname, '[^[:space:]]{18,}')
  from tablename
  where regexp_like(businessname, '[^[:space:]]{18,}')

or...

  -- first (space delimited) word has length > 17
  select regexp_substr(businessname, '[^[:space:]]{18,}')
  from tablename
  where regexp_like(businessname, '^[^[:space:]]{18,}')

--
Peter
 




 2 Posts in Topic:
find word greater than 17
ciojr@[EMAIL PROTECTED]   2008-04-23 07:40:06 
Re: find word greater than 17
Peter Nilsson <airia@[  2008-04-23 19:58:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Wed Dec 3 0:27:37 CST 2008.