Hi,
Sorry if this is really obvious, but I'm very new to all this PL/SQL
malarkey. I want a procedure to create a view. Here's the procedure:
create or replace procedure viewproc
( ns in varchar2, nt in varchar2, nvid in varchar2 )
as
begin
create or replace view testview1 as
select * from emp;
end viewproc;
it fails to compile: here's what the error message says:
SQL> show errors
Errors for PROCEDURE VIEWPROC
LINE/COL ERROR
5/1 PLS-00103: Encountered the symbol "CREATE" when expecting one of
the following:
begin declare exit for goto if loop mod null pragma raise
return select update while <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall
<a single-quoted SQL string>
What have I done wrong?
thanks,
Received on Thu Feb 24 2000 - 04:24:19 CST