Hello,
I'm just starting to learn PL/SQL. To get my feet wet,
I'm trying to write a simple stored procedure that takes some
values as parameters, and inserts those values into a table.
For some reason my simple procedure is not working, I'm
probably missing something simple. Here is how I'm trying to
create this procedure:
CREATE OR REPLACE PROCEDURE insert_person(u id IN NUMBER,
first_nm IN VARCHAR,
middle_nm IN VARCHAR,
last_nm IN VARCHAR) IS
BEGIN
INSERT INTO PERSONS (prsn_uid, prsn_first_nm, prsn_middle_nm,
prsn_last_nm) values (uid, first_nm, middle_nm,
last_nm);
END insert_person;
I'm not sure this is relevant, but I'm typing the above
declaration into an Java based SQL client called SquirrelSQL
(http://sourceforge.net/projects/squirrel-sql/), the
output I get after executing the above is:
Warning: Warning: execution completed with warning
SQLState: null
ErrorCode: 17110
0 Rows Updated
Query 1 elapsed time (seconds) - Total: 0.053, SQL query: 0.053,
Building output: 0
Error: java.sql.SQLExc eption: ORA-00900: invalid SQL statement
Can anyone please point out what is wrong with the above
procedure?
Thanks,
Eraser
I'm just starting to learn PL/SQL. To get my feet wet,
I'm trying to write a simple stored procedure that takes some
values as parameters, and inserts those values into a table.
For some reason my simple procedure is not working, I'm
probably missing something simple. Here is how I'm trying to
create this procedure:
CREATE OR REPLACE PROCEDURE insert_person(u id IN NUMBER,
first_nm IN VARCHAR,
middle_nm IN VARCHAR,
last_nm IN VARCHAR) IS
BEGIN
INSERT INTO PERSONS (prsn_uid, prsn_first_nm, prsn_middle_nm,
prsn_last_nm) values (uid, first_nm, middle_nm,
last_nm);
END insert_person;
I'm not sure this is relevant, but I'm typing the above
declaration into an Java based SQL client called SquirrelSQL
(http://sourceforge.net/projects/squirrel-sql/), the
output I get after executing the above is:
Warning: Warning: execution completed with warning
SQLState: null
ErrorCode: 17110
0 Rows Updated
Query 1 elapsed time (seconds) - Total: 0.053, SQL query: 0.053,
Building output: 0
Error: java.sql.SQLExc eption: ORA-00900: invalid SQL statement
Can anyone please point out what is wrong with the above
procedure?
Thanks,
Eraser
Comment