Hi all

I need to run a dynamic sql statement but I have a problem:
1.
create procedure "dba".TEST()
begin
declare @str varchar(1000);
set @str='create table str2(str2 varchar(200))';
execute immediate @str;
end

This proc run successfully and str2 table is created.

2.
create procedure "dba".TEST1()
begin
declare @str varchar(1000);
set @str='insert into str2(str2) value("hello")';
execute immediate @str;
end

when I call this proc, system raise an error :
syntax error--error position too large

but I run insert into str2(str2) value("hello") successfully on ISQL

3.

create procedure "dba".TEST2()
begin
declare @str varchar(1000);
set @str='select * from str2';
execute immediate @str;
end

when I call this proc, it does not return any record.

what is wrong in 2. and 3. section.
Please help me

Thanks in advance
Thi Nguyen