loading Timestamp into Oracle
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 60
- Joined: Tue Sep 20, 2011 10:44 pm
- Location: INDIA
loading Timestamp into Oracle
Hi All,
Inserting timestamp value into Oracle in 8.5 and 9.1.
In 8.5 I am able to see the right value
25/FEB/14 09:02:18.000000000 PM
In 9.1 the time stamp is being defaulted to
25/FEB/14 12:00:00.000000000 AM
I tried to run with the same data and same code in both environments and they both loading same table one after the other in same environment.
Data looks good in both cases except for timestamp.
Any ideas.
Regards
Kumar
Inserting timestamp value into Oracle in 8.5 and 9.1.
In 8.5 I am able to see the right value
25/FEB/14 09:02:18.000000000 PM
In 9.1 the time stamp is being defaulted to
25/FEB/14 12:00:00.000000000 AM
I tried to run with the same data and same code in both environments and they both loading same table one after the other in same environment.
Data looks good in both cases except for timestamp.
Any ideas.
Regards
Kumar
-
- Participant
- Posts: 60
- Joined: Tue Sep 20, 2011 10:44 pm
- Location: INDIA
The Oracle datatype is Timestamp(6) and the column we are loading in is of datatype timestamp.
Example:
Record in 9.1
RMA_DATE Database
20140225 060253 25/FEB/14 12:00:00.000000000 AM
Record in 8.5
RMA_DATE Database
20140225 060253 25/FEB/14 06:02:53.000000000 AM
Also tried to run the job by setting the extended property to microseconds doesn't make any difference.
I did tried to manually insert a record on database with current_timestamp into the field and the data looks good.
The issue really is when the Datastage 9.1 trying to load the data in the Database.
Regards
Kumar
Example:
Record in 9.1
RMA_DATE Database
20140225 060253 25/FEB/14 12:00:00.000000000 AM
Record in 8.5
RMA_DATE Database
20140225 060253 25/FEB/14 06:02:53.000000000 AM
Also tried to run the job by setting the extended property to microseconds doesn't make any difference.
I did tried to manually insert a record on database with current_timestamp into the field and the data looks good.
The issue really is when the Datastage 9.1 trying to load the data in the Database.
Regards
Kumar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 60
- Joined: Tue Sep 20, 2011 10:44 pm
- Location: INDIA
Hi All,
The issue has been resolved.
We are loading the table from a file and we are using a schema file to load the column definitions.
In 8.5 we are defining the column definition as timestamp in the schema file and it is populating the time component perfectly fine.
In 9.1 we are using the same file but doesn't load the time component.
Hence I changed the column definition to use microseconds and it worked fine.
Not sure why it worked...
Anyway thanks for alll your inputs.
Regards
Kumar
The issue has been resolved.
We are loading the table from a file and we are using a schema file to load the column definitions.
In 8.5 we are defining the column definition as timestamp in the schema file and it is populating the time component perfectly fine.
In 9.1 we are using the same file but doesn't load the time component.
Hence I changed the column definition to use microseconds and it worked fine.
Not sure why it worked...
Anyway thanks for alll your inputs.
Regards
Kumar
Because you are loading a Timestamp(6) and it needs microseconds in that case. You got away without doing it in 8.5 but could no longer in 9.1 where they've tightened things up.
Something we see all the time when they fix things in later releases that were technically broken in earlier ones and a job was reliant on the 'broken' behavior.
Something we see all the time when they fix things in later releases that were technically broken in earlier ones and a job was reliant on the 'broken' behavior.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers