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_
You can do it in PL/SQL, it can look like this (if I understand your requirement properly):
create table sql_commands (cmd varchar2(1000));
insert into sql_commands values ('select * from table_1');
insert into sql_commands values ('select * from table_2');
commit;
declare
begin
for aLine in (select cmd from sql_commands) loop
execute immediate aLine.cmd into ... -- depends on your command
end loop;
end;