Re: Newbie PL/SQL Question - Inserting into a table from a stored procedure

From: Alex Ivascu <alex_at_No-Spam-ivascu.com>
Date: Tue, 1 Jun 2004 16:46:52 -0700
Message-ID: <6z8vc.43840$zN5.11224_at_fed1read01>


There doesn't seem to be nothing wrong with your statement. It might be the way SquirrelSQL interprets it.

Alex Ivascu

"Eraser" <eraser_at_nospam.com> wrote in message news: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 Wed Jun 02 2004 - 01:46:52 CEST

Original text of this message