This is a discussion on find word greater than 17 within the Oracle Miscellaneous forums, part of the Oracle Database category; --> i am looking to find the first word of a field greater than 17 select businessname from tablename where ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |