Hi experts,
i am reading a date column from an oracle table and writing it to a file.
its a very simple select query[select distinct doc_date as gdatu from VBAK_AR] i am using in the Oracle OCI stage.
But when i read the dates using Oconv function [Oconv(DSLink25.GDATU,"D/DMY[2,2,4]")] i get wrong dates which are not in the table. specifically i get dates greater than actual dates.
can u guess what can be wrong???
regards,
Oracle stage gives wrong dates
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 136
- Joined: Wed May 07, 2008 11:26 am
- Location: Sydney, Australia
- Contact:
Hi,
My job design is simple. OracleOCI --> Transformer -->Seq File.
when i do right click on OracleOCI stage and view data, then it shows dates in internal format. when i view the dates in TOAD then maximum date that i get is 12-02-2009. So i put Oconv in transformer and loaded the dates to the file. then when i see the dates int the file it shows me the date of 2012, 2016, etc.
regards,
My job design is simple. OracleOCI --> Transformer -->Seq File.
when i do right click on OracleOCI stage and view data, then it shows dates in internal format. when i view the dates in TOAD then maximum date that i get is 12-02-2009. So i put Oconv in transformer and loaded the dates to the file. then when i see the dates int the file it shows me the date of 2012, 2016, etc.
regards,
Vinay
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You get those integer values when using Date as the data type, change it to Varchar and use TO_CHAR() with the appropriate mask in the select statement. I don't know what they are, but they're not DataStage internal values so OConv is not the right thing to use with them.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers