Sepertinya ada yang salah pada coding bapak, ini sudah saya coba perbaiki
create or replace procedure sp_test is
IsengAja varchar2(200);
begin
IsengAja := 'create table tmp_saya as select 1 AS NO from dual';
execute immediate (IsengAja);
end;
--------------------------------
exec sp_test (menjalankan)
---------------------------------
select * from temp_saya ( cek hasil nya)
---------------------------------
semoga membantu
ade
--- In [email protected], "Oracle JR" <[EMAIL PROTECTED]> wrote:
> Salam.
>
> Gimana ya caranya memanggil sebuah stored procedure dari SQLPLUS
> yang mengandung perintah DDL.
> Sebagai contoh:
>
> create or replace procedure sp_test is
>
> IsengAja varchar2(200);
>
> begin
>
> IsengAja := 'create table tmp_saya as select 1 from dual;';
> execute immediate (IsengAja);
>
> end sp_test;
>
> Pada saat dipanggil dari prompt, keluar error:
> begin sp_test; end;
>
> ORA-00911: invalid character
> ORA-06512: at "IA_USER.SP_TEST", line 8
> ORA-06512: at line 1
>
> Terima kasih sebelum dan sesudahnya.
>
>
> Wassalam.
--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.blogspot.com
-----------------------------------------------
Bergabung dengan Indonesia Thin Client User Groups,
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.vze.com
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "indo-oracle" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Sell on Yahoo! Auctions - No fees. Bid on great items.
[Non-text portions of this message have been removed]
--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.blogspot.com
-----------------------------------------------
Bergabung dengan Indonesia Thin Client User Groups,
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.vze.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/indo-oracle/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/