Dynamic SQL Query count
564035Jun 16 2007 — edited Jun 21 2007Hi,
I need to retieve the number of records that will be retrieved by a query as follows.
How can this be done?
Is there a method to do it using native dynamic sql (open .. for .. using ) instead of DBMS_SQL (Because Native is faster than dbms_SQL )?
The following block demostrates what I need to do where v_query will hold the query text.
declare
v_query varchar2(32000);
v_count number;
begin
select query_text into v_query from groups_table where id =1;
...
...
dbms_output.put_line('count = '||v_count);
end;
Thanks in Advance