Help req urgent..!! [message #3176] |
Tue, 10 September 2002 22:00 |
Gilbey
Messages: 87 Registered: March 2002
|
Member |
|
|
Though this procedure is executing but it is not inserting the values.Could anyone please tell me the reason.Thanks is advance.
SQL> ed
Wrote file afiedt.buf
1 create or replace procedure scenario1(v_cntryid in varchar2,v_trackingno in varchar2)
2 is
3 cursor cur (c_code varchar2) is select distinct formula_text
4 from lcs_hts
5 where country_id=v_cntryid and
6 tracking_no=v_trackingno and
7 substr(hts_chapter_no,1,2)=c_code;
8 v_text lcs_hts.formula_text%type;
9 i number(3);
10 j varchar2(3);
11 begin
12 for i in 1..99
13 loop
14 j:=to_char(i,'00');
15 open cur('j');
16 loop
17 fetch cur into v_text;
18 exit when cur%notfound;
19 insert into f_text values(j,v_text);
21 end loop;
22 close cur;
23 end loop;
24* end;
25 /
Gilbey
|
|
|
Re: Help req urgent..!! [message #3179 is a reply to message #3176] |
Wed, 11 September 2002 00:16 |
Keith
Messages: 88 Registered: March 2000
|
Member |
|
|
I don't think your insert statement is valid. According to the Oracle docs:
Although you can retrieve entire records, you cannot insert or update them. For example, the following statement is illegal:
INSERT INTO dept VALUES (dept_rec); -- illegal
So, you'll have to split up the v_text TYPE when you do the insert.
keith
|
|
|
|