Home » SQL & PL/SQL » SQL & PL/SQL » paramertised cursor
paramertised cursor [message #329061] Mon, 23 June 2008 23:43 Go to next message
deepika.a
Messages: 1
Registered: June 2008
Junior Member
whether itz possible to retrieve the employee jobid using parameterised cursor like dis


declare
cursor cur1(job_in varchar(9))
is
select empno,ename,job from employee
where job=upper(job_in);
cur_rec cur1%rowtype;
begin
open cur1(:employee.job_in)
fetch cur1 into cur_rec;
dbms_output.put_line(cur_rec);
end;

[Updated on: Mon, 23 June 2008 23:45]

Report message to a moderator

Re: paramertised cursor [message #329062 is a reply to message #329061] Mon, 23 June 2008 23:44 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow Posting Guidelines as stated in URL above
Re: paramertised cursor [message #329073 is a reply to message #329061] Tue, 24 June 2008 00:15 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
whether itz (it is) possible to retrieve the employee jobid using parameterised cursor like dis (this)

No; it is impossible to retrieve employee's "jobid" using a cursor like this.

Why? Because your code is full of errors.

On the other hand, yes - it is possible to retrieve employee's "jobid" using a parametrised cursor (only if you took some time to read the documentation and learn how to properly write a code).
Re: paramertised cursor [message #329080 is a reply to message #329061] Tue, 24 June 2008 00:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
In addition, please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter).
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Re: paramertised cursor [message #329085 is a reply to message #329061] Tue, 24 June 2008 00:45 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Did you register as a new user so you could start your thread all over?
Same IP, same code, same error.
Previous Topic: Locking a table before doing an Insert.....Pls help
Next Topic: procdure and function diff for this scenario
Goto Forum:
  


Current Time: Wed Feb 19 15:14:50 CST 2025