Friday 13 December 2019

Friday Funny - Festival of serious yahoos

I don't care what you all think, this is my blog, and I continue to laugh at this SQL joke.

select column_value
from apex_string.split('YAHOO~SERIOUS~FESTIVAL', '~')
order by dbms_random.value

If you're a Simpsons fan, you may recall this clip

Yahoo Serious Festival - The Simpsons
If you're not aware, Yahoo Serious is an Australian actor from the movie of the same name. He made it onto Time magazine, then nothing.

But how nifty is that apex_string.split function? And it's cousin join?
Although recently I saw Connor use what appears to be a native option, one that doesn't require an APEX package. On the blog topic list...


Tony said...

Don't you need "table"

select column_value
from table(apex_string.split('YAHOO~SERIOUS~FESTIVAL', '~'))
order by dbms_random.value

Scott Wesley said...

Not anymore, certainly not in 18c.

I'd give a reference, but google-foo low on these keywords. I know Connor has a post...

Jeff E. said...

Perhaps this is what you were referring to (

SQL> select
2 t.contact_id,
3 regexp_substr(t.first_name, '[^\/]+', 1, c1.column_value) as fname,
4 regexp_substr(t.last_name, '[^\/]+', 1, c1.column_value) as lname
5 from
6 t,
7 table(cast(multiset(select level from dual connect by level <= length (regexp_replace(t.first_name, '[^\/]+')) + 1) as sys.OdciNumberList)) c1;

Scott Wesley said...

No, with Tony I'm talking about no longer having the need to use table() to invoke your table functions.
I have an email conversation with the OCDINumberList.

Stefan Dobre said...

If you're gonna go the apex_string way, at least go all out :)

select column_value
from apex_string.shuffle(apex_string.split('YAHOO~SERIOUS~FESTIVAL', '~'));

Scott Wesley said...

Oh that's good.