Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic SQL inside Stored Procedures
Wupps... I didn't trim out everything that wasn't needed...
Here's the adjusted code:
create or replace
procedure test_seq
is
i_query varchar2(2000); i_cursor integer; i_void integer; begin begin i_query := 'create sequence test_sequence start with 999'; i_cursor := dbms_sql.open_cursor; dbms_sql.parse(i_cursor,i_query,dbms_sql.v7); i_void := dbms_sql.execute(i_cursor); dbms_sql.close_cursor(i_cursor); exception when others then dbms_output.put_line('create sequence failed...'); end;
![]() |
![]() |