Home » SQL & PL/SQL » SQL & PL/SQL » cursor with dynamic table
cursor with dynamic table [message #395570] Wed, 01 April 2009 22:41 Go to next message
Messages: 28
Registered: November 2007
Location: Indonesia
Junior Member

Hi all..
i have a problem with cursor dynamic table, for example
this my script.but that script error.
how to make cursor with dynamic table?
help me...


vTable Varchar2(50) := 'TCPUR101T';
Sqlstm Varchar2(2000);


Sqlstm := 'Select * from '||vTable;

For i In (Sqlstm)
End Loop;

Re: cursor with dynamic table [message #395575 is a reply to message #395570] Wed, 01 April 2009 22:46 Go to previous messageGo to next message
Messages: 24963
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.

>this my script.but that script error.
ERROR? What Error? I don't see any error.

Please, please, please Read & Follow Posting Guidelines above.
Go to the section labeled "Practice" & do as directed.

I suggest you first make the code work with a hard coded value.
First make it work, then make it fancy!

[Updated on: Wed, 01 April 2009 22:54]

Report message to a moderator

Re: cursor with dynamic table [message #395608 is a reply to message #395570] Thu, 02 April 2009 01:11 Go to previous message
Michel Cadot
Messages: 63917
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to open, fetch and close the cursor by yourself in this case.

Previous Topic: Performance issue with name value pairs
Next Topic: cursors with same codes
Goto Forum:

Current Time: Tue Oct 25 00:55:35 CDT 2016

Total time taken to generate the page: 0.10031 seconds