Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Cursor 1

Status
Not open for further replies.

Pacholi

Programmer
Sep 30, 2003
6
CL
Hi!:
Some body now hoy do a dynamic cursor in pl/sql

Atte.
Alejandro Devia M.
Consultor
Pyx
56-0-9 072 15 30
 
Try something like this example:

Declare
Type C0_Typ Is Ref Cursor;
C0 C0_Typ;
C Number;
Begin
For T In (Select Table_Name From User_Tables)
Loop
Open C0 For 'Select Count(*) Cnt From '||T.Table_Name;
Loop
Fetch C0 Into C;
Exit When C0%Notfound;
Dbms_Output.Put_Line(T.Table_Name||' = '||C);
End Loop;
End Loop;
End;
/


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top