Garayed.com  

Go Back   Garayed.com > Oracle
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-23-2008, 02:40 PM
ciojr@yahoo.com
 
Posts: n/a
Default find word greater than 17

i am looking to find the first word of a field greater than 17

select businessname
from tablename
where
CHAR(' ', businessname + ' ') > 17
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-24-2008, 02:58 AM
Peter Nilsson
 
Posts: n/a
Default Re: find word greater than 17

ci...@yahoo.com 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:09 PM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.