Home » SQL & PL/SQL » SQL & PL/SQL » problem with cursor
problem with cursor [message #210042] Tue, 19 December 2006 01:31 Go to next message
v.ram81
Messages: 50
Registered: April 2006
Location: pune
Member

hi
i have problem with cursor.
i have dealer balance yearly tables.
such as dlrbal_20052006,dlrbal_20042005... so on.
now i want to select records from table .
table name (or year string )eg. 20042005 is taken as input
from user.
[COLOR=blue]how can i use parameter or bind veriables in cursor
select clause[/COLOR]?

the cursor looks like this
cursor c1 is
select * from
dlrbal_20042005;
now i want 20042005 string should get replaced
by user inputed value.

thanks in advance.

ram.
Re: problem with cursor [message #210043 is a reply to message #210042] Tue, 19 December 2006 01:33 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
You cannot bind object names. I think you might want to have a look at REF CURSORS.

MHE
Re: problem with cursor [message #210071 is a reply to message #210043] Tue, 19 December 2006 03:49 Go to previous message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
hi

might be using the procedure using an IN parameter. or parametrized cursor .

Bye
Ashu
Previous Topic: regarding the script plz help
Next Topic: Trigger For insert as well as update
Goto Forum:
  


Current Time: Sat Dec 10 05:28:29 CST 2016

Total time taken to generate the page: 0.14647 seconds