When using oracle SQL is it possible to run a query based on a text_string from a subquery? An example might clarify what I\'m trying to do
select count(sql_
Going through Basics..
When the database executes an SQL
1) It would first do SEMANTIC check by validating the syntax and the objects (tables and columns used) in SQL.
2) Based on it, the optimizer draws a PLAN(calculating the indexes to be used, with the available table statistics and histograms)..
3) And the SQL Engine executes the Query as per the PLAN.
So, all these means, the SQL cannot do dynamic object referings.. Since it needs to study all the elements in SQL before execution itself.
Hence, unfortunately, your requirement is NOT possible with a simple SQL solution.
PL/SQL or some other Database specific special tools.. is what you have to opt for.