This discussion is archived
4 Replies Latest reply: Jul 28, 2010 1:41 PM by Hoek RSS

pl/sql Funtion : PLS-00103: Encountered the symbol "CREATE"

787281 Newbie
Currently Being Moderated
drop table ur2users;
drop table ur3users;


-- Create a sql wrapper for the jave class password migrator
create or replace
function hi_world_sample (p_command IN VARCHAR2)
return VARCHAR2
AS LANGUAGE JAVA
NAME 'HiWorld.MyMessage(java.lang.String) return java.lang.String';


--Create temporary table ur2users to insert ur2 users
Create table ur2users
(
user_id number(19,0),
email varchar(250),
password varchar(250));

-- Create temporary table ur3users to insert ur3 users
Create table ur3users
(
user_id number(19,0),
email varchar(250),
password varchar(250));


When I the above query is run in sql developer on Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production, following is displayed:

FUNCTION HI_WORLD_SAMPLE compiled
Errors: check compiler log

-----compiler log----
I get the errorPLS-00103: Encountered the symbol "CREATE"


When I run the function as stand alone it compiles without errors.

what am I doing wrong?

Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points