cancel
Showing results for 
Search instead for 
Did you mean: 

Flat file to Oracle Database - Invalid Month

Former Member
0 Kudos

Hi All

I am New to XI and trying to create a simple interface between Legacy system (flat file) and Oracle database.

I have some date fields in the Oracle table.

When i run the interface it says "invalid month" with some SQL exception number.

I am using (mm/dd/yyyy) format for the date.

Is there any conversion i need to do. I am using XML SQL format for Oracle database.

Any help is appreciated.

Thanks

Nagakishore

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

HI,

Check out database table date field structure and act accordingly.

For reference-

http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

Regards,

Moorthy

Former Member
0 Kudos

Hi Moorthy

Thanks for your reply.

I have checked the database fields and I am sending the data according to the table structure.

Regards

NagaKishore V

Former Member
0 Kudos

Naga

Post the exact error and if possible trace of the insert stmt with payload.

Former Member
0 Kudos

Hi Sriram

Thanks for responding.

Find below the error.

Unable to execute statement for table or stored procedure. 'MKT_PROG_LOG' (Structure 'statement') due to java.sql.SQLException: ORA-01843: not a valid month

Regards

NagaKishore V

moorthy
Active Contributor
0 Kudos

Hi,

Probably this therad will solve your problem-

Regards,

Moorthy

Former Member
0 Kudos

Hello,

Oracle is very picky with the way date is stored. Assume that you have a field datefield that you need to save. In mapping add an attribute hasqQuote and set it to "NO". When mapping the value to the node use to_date as shown below.

<DateField hasQuot="No">

TO_DATE("2004-07-20", "yyyy-mm-dd hh:mi:ss")</DateField>

cheers,

Naveen

Former Member
0 Kudos

Hi All

Thanks for all help. I was able to solve the problem using this blog.

/people/alessandro.berta/blog/2005/10/04/datetime-datatypes-and-oracle-database

Regards

NagaKishore V

Answers (0)