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: 7065
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: Tue Dec 03 06:25:09 CST 2024