Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011
    Posts
    1

    Unanswered: Plzz help....with this wierd problem in stored procedure

    I am new to stored procedure.....
    curently I am writing an insert statment in a SP
    but it alwz giving me error tht
    Error(3,1): PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following: begin function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> form current cursor external language
    My stored procedure is :

    create or replace PROCEDURE EmpSave
    AS
    DECLARE
    @EmpId NUMBER(10),
    @EmpTypeId NUMBER(2),
    @EmpValue NUMBER(2),
    @OUTT INT OUT
    BEGIN
    Insert into Employee(Emp_ID, Emp_TYPE_ID, Emp_VALUE)
    values(@EmpID, @EmpTypeId, @EmpValue);
    SET @OUTT := @@IDENTITY;
    RETURN @OUTT;
    END EmpSave;
    Last edited by Tanvi1508; 04-12-11 at 04:32.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    This looks suspiciously like SQL Server syntax. Especially with the @@identity. Is this in the right forum?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •