Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Error Creating simple stored procedure stub

Re: Error Creating simple stored procedure stub

From: The Flying Spontinalli <wolf__at_tiscali.co.uk>
Date: 9 Oct 2006 02:01:34 -0700
Message-ID: <1160384494.682176.49210@i42g2000cwa.googlegroups.com>


You can't specify the number of bytes for a varchar2() in parameter:

> CREATE OR REPLACE PROCEDURE AddTestEvent (
> EmpId IN INTEGER,
> RegNo IN VARCHAR(8),
> CasaNr IN INTEGER,

remove the (8) and you'll be fine.

Malachy O'Connor wrote:
> Hi guys,
>
> This is a real basic question so my apologies if i am posting to the
> incorrect group.
>
> When I try and create the following sp:
>
> /***********************************************************
> ** Procedure: AddTestEvent
> **
> ** Created On: 09-Oct-06 Created By: MOC
> **
> ** Description:
> ** This stored procedure creates a new test event
> ** and returns the TestID of the event created.
> ***********************************************************/
> CREATE OR REPLACE PROCEDURE AddTestEvent (
> EmpId IN INTEGER,
> RegNo IN VARCHAR(8),
> CasaNr IN INTEGER,
> TestDate IN DATE,
> Hours IN INTEGER,
> Score IN INTEGER,
> TestID OUT INTEGER) AS
>
> BEGIN
> INSERT INTO tempTable(tmpID)
> VALUES (1);
> END AddTestEvent;
>
> I get the following error:
>
> LINE/COL ERROR
> 3/35 PLS-00103: Encountered the symbol "(" when expecting one of the f
> ollowing: := . ) , @ % default character The symbol ":=" was
> substituted for "(" to continue.
>
> This is driving me insane. I've come from a SQL Server background so
> i'm probably doing something really stupid but i can see no reason why
> the procedure above wont work.
>
> Any help would be greatly apriciated.
>
> Malachy
Received on Mon Oct 09 2006 - 04:01:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US