Forms_ddl insertion problem [message #413286] |
Wed, 15 July 2009 02:16 |
jolly_makkar
Messages: 63 Registered: March 2008
|
Member |
|
|
Quote: | declare
cursor c1 is select internal_no from rec_start_letter where envelope_no=:control.env_no;
v_no varchar2(40);
begin
forms_ddl('create table table2(internal_no varchar2(40))');
open c1;
loop
fetch c1 into v_no;
exit when c1%notfound;
forms_ddl('INSERT INTO TABLE2 VALUES('||V_no||')');
END LOOP;
CLOSE C1;
END;
|
It inserts the value in table with some strange value 3.84661....
if i changes forms_ddl insertion
Quote: | forms_ddl('INSERT INTO TABLE2 VALUES(V_no)');
|
then none of the data gets inserted.
I am not able to find where i am doing mistake..Any help will be worth .
Thanks
|
|
|
|
Re: Forms_ddl insertion problem [message #413332 is a reply to message #413286] |
Wed, 15 July 2009 04:39 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
If you're having problems with dynamic sql it's always a good idea to build up a string of the statement you plan to execute. You can then display that string with a message or an alert to see if you've got it right.
I'd also strongly recommend not creating tables dynamically - it's almost never necessary.
|
|
|
|