I was trying to find a specific subset of result tables in my database by querying for tables by name and then querying inside those tables.
I know I can get a list of tables like this:
SELECT table_name FROM all_tables WHERE table_name LIKE 'MY_RESULTS_%'
But what I can't figure out is how to use that list in another select statement. For example, I'd like to do something like this:
-- DOESN'T WORK --
SELECT table_name FROM all_tables
WHERE table_name LIKE 'OUTPUTDATA_%'
AND get_table_by_name(table_name).my_value_col = 'Special Value';
This is on an Oracle database with SQL Developer.