Hi Gurus,
I have both source and target tables as Oracle database.I am using custom sql in the source table to load into target.
I have a situation like this:
for postdate field source datatype is numeric but target datatype is timestamp
so in userdefined SQL i used
to_date(J1.JC_COST_DATE,'YYYYMMDD')
for currentfield is date datatype in source table but timestamp in target table
while running the datastage job i am getting following error:
Attempt to convert String value "15-MAR-06" to Timestamp type unsuccessful
Can you please light on me.
Thanks in advance.
Reddy
Oracle Date field to Timestamp
Moderators: chulett, rschirm, roy
Reddy
Your format is not correct that's the reason you are getting this error.
Your format is not correct that's the reason you are getting this error.
Use to_date(J1.JC_COST_DATE,'DD-MON-YY') that should workAttempt to convert String value "15-MAR-06" to Timestamp type unsuccessful
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
All source data columns of data type DATE should use a TO_CHAR function with a mask of YYYY-MM-DD HH24:MI:SS. DS automatically puts this on the SQL for auto-generated SQL, but since you hand-wrote your SQL you must do this.
All target columns of data type DATE or TIMESTAMP should use a TO_DATE function with a mask appropriate to your NLS setting, usually YYYY-MM-DD HH24:MI:SS. Again, DS automatically puts this on the SQL for auto-generated SQL, but if you hand-wrote your DML you must do this.
All target columns of data type DATE or TIMESTAMP should use a TO_DATE function with a mask appropriate to your NLS setting, usually YYYY-MM-DD HH24:MI:SS. Again, DS automatically puts this on the SQL for auto-generated SQL, but if you hand-wrote your DML you must do this.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle