Home » SQL & PL/SQL » SQL & PL/SQL » Inserting record into PL/SQL Tables
Inserting record into PL/SQL Tables [message #211528] Fri, 29 December 2006 03:55 Go to next message
ameyg
Messages: 2
Registered: November 2006
Location: INDIA
Junior Member
declare
p_warning gb_common_strings.err_type;
p_job_labor nb_job_labor.job_labor_tab;
sk nb_job_labor.job_labor_ref;
TYPE p_job_labor_tab IS TABLE OF sk INDEX BY BINARY_INTEGEr;
cursor cursor_027 is
select np_job_labor.f_query_all(261, 'A00005', 00, '01-JUL-1993')
from dual;
begin
open cursor_027;
loop
fetch cursor_027
into sk;
exit when cursor_027%notfound;
np_job_labor.p_update(p_pidm => 261,
p_posn => 'A00005',
p_suff => 00,
p_effective_date => '01-JUL-1993',
p_job_labor_tab => p_job_labor,
p_user_id => user,
p_warnings_out => p_warning);
end loop;
close cursor_027;
end;

I want to populate the pl/sql table p_job_labor in p_update using the values from cursor_027.
Please suggest.
Re: Inserting record into PL/SQL Tables [message #211571 is a reply to message #211528] Fri, 29 December 2006 09:32 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Why do you use a cursor for this?? You can simply assign the value.
Read up on collections in the Oracle documentation.
(And try to think up more descriptive names for your cursors!)
Previous Topic: datetime in 10 g
Next Topic: How is it possible?!
Goto Forum:
  


Current Time: Sat Dec 10 05:15:17 CST 2016

Total time taken to generate the page: 0.12386 seconds