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.
Related articles:
Filed in Oracle, Tips on 19 Jul 05 | Tags: sql, string
Thanks, Eddie: that one is worth its weight in gold!
I like these simple yet powerful SQL statements. I’ll keep on posting such queries here as soon as I discover them.