[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Insert Error- Date Problem



Hello All!

DATABASE = Oracle 8

I wrote a simple sqr that reads a flat file and inserts into a
PeopleSoft table (PERSONAL_DATA).  The flat file only has about 12
fields so I am inserting default values or spaces for the other 100+
fields in the table.  The program is reading the file perfectly but when
it goes to insert, I get an error:

(SQR 5528) ORACLE OCIStmtExecute error 1847 in cursor 5:
   ORA-01847: day of month must be between 1 and last day of month

Error on line 203:
   (SQR 3735) Could not execute SQL.

There are about 10 date fields on this record but I am only inserting
values for 2 of them.  For the other 8 date fields, I tried inserting
NULL, '', and ' ' and had no luck.

When I read the date off the flat file, the string looks like this:
19700101

I then do a datetostr using the mask of 'DD-MON-YYY' so the value being
inserted is '01-JAN-1970'.  I don't think this is the problem though.

Does anyone have any ideas?  I appreciate your time.

Thanks,
Jason