Here is a query that puts each character of a given string in its own row:
select substr( 'eddie awad', rownum, 1)
from all_objects
where rownum <= length('eddie awad');
The table all_objects is used in the query as a row generator. Sweet.
Possibly related:
- Google, Googlism and Emoticons
- Paging through a query result
- SQL problem
- What is the COST?
- Sequential GUIDs
Tagged sql, string | Post a Comment


















Thanks, Eddie: that one is worth its weight in gold!
July 20th, 2005, at 12:24 am #I like these simple yet powerful SQL statements. I’ll keep on posting such queries here as soon as I discover them.
July 20th, 2005, at 11:04 pm #