Ok, I've seen this done here before but cannot find it again, and have no idea what to search for (tried, but not finding anything).
I suspect it uses TABLE, CAST and/or MULTISET functions in a query .. but reading the docs on those, I can't seem to piece together how to do it.
When I piece together a sample/test query, I usually do something like this:
WITH data AS
( SELECT 123 id, 'abc' col1 FROM dual UNION ALL
SELECT 234, 'def' FROM dual UNION ALL
SELECT 345, 'xyz' FROM dual
)
SELECT *
FROM data -- usually more complex query here
/
However, I saw somebody do this without using the UNION ALL .. they did something with TABLE ( ... ) ??
Anyone know how to do this? I'm just curious, as it seemed "simpler" than the UNION ALL method I've used previously, and I figured it would be a nice trick to learn and leverage in other ways if I can understand how it works :)
Thanks!