Newbie PL/SQL Question - Inserting into a table from a stored procedure
Date: Sun, 30 May 2004 11:57:26 +0200
Message-Id: <pan.2004.05.30.09.57.25.494180_at_nospam.com>
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(uid 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.SQLException: ORA-00900: invalid SQL statement
Can anyone please point out what is wrong with the above procedure?
Thanks,
Eraser
Received on Sun May 30 2004 - 11:57:26 CEST