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

Home -> Community -> Usenet -> c.d.o.misc -> Passing Dates into stored procedures

Passing Dates into stored procedures

From: Louis Frolio <frolio_at_videoshare.com>
Date: Tue, 22 Feb 2000 15:58:51 -0500
Message-ID: <88ut7f$o8l$1@bob.news.rcn.net>


Greetings all, i just wrote a procedure in Oracle8. This procedure takes as one of the passed values a birth date. However, when I pass the required values to the procedure I get the following error message:

SQLWKS> execute spAddUser (4, 'FirstName', 'Last Name', 'V', 'Address1', 'Address2', 'City', 'ST', 'ZIP', 840, '09/03/66' , 'M', 0, 'IT', 'E Commerce');
ORA-01843: not a valid month
ORA-06512: at line 2

Her are the contents of my procedure:

  CREATE OR REPLACE PROCEDURE spAddUser    (
    IinUserId IN NUMBER,
    IvcFirstName IN VARCHAR2,
    IvcLastName IN VARCHAR2,
    IchMiddleInitial IN CHAR,

    IvcAddress1      IN VARCHAR2,
    IvcAddress2      IN VARCHAR2,
    IvcCity                IN VARCHAR2,
    IvcState             IN VARCHAR2,
    IvcZipCode       IN VARCHAR2,
    IsiCountryCode   IN NUMBER,
    IsdBirthDate        IN DATE,
    IchGender           IN CHAR,
    ItiMarried           IN NUMBER,
    IvcOccupation    IN VARCHAR2,
    IvcIndustry          IN VARCHAR2

   )

  IS

  BEGIN
    INSERT INTO tbUser (inUserId, vcFirstName, vcLastName, chMiddleInitial, vcAddress1,

                        vcAddress2,  vcCity,      vcState,    vcZipCode,
siCountryCode,
                        sdBirthDate, chGender,    tiMarried,  vcOccupation,
vcIndustry,
                        sdDate,      tiActive)

    VALUES (IinUserId, IvcFirstName, IvcLastName, IchMiddleInitial, IvcAddress1,

            IvcAddress2, IvcCity, IvcState, IvcZipCode, IsiCountryCode,

            IsdBirthDate, IchGender, ItiMarried, IvcOccupation, IvcIndustry,

            SysDate, 1);

  END spAddUser;

I would appreciate any help with regards to this matter.

Louis Received on Tue Feb 22 2000 - 14:58:51 CST

Original text of this message

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