Connector Oracle Error
Moderators: chulett, rschirm, roy
The following sql
gives this
Like I said i'm using RCP so i don't declare any datatypes
Code: Select all
select ID,TO_CHAR(MYDATE, 'DD/MM/YYYY hh24:mi:ss'),cast(MYDATE as timestamp) from MYTABLE where ID=1
Code: Select all
1 00/01/3948 00:00:00 31/12/47 00:00:00,000000000
Hope This Helps
Regards
Regards
So... how is your MYDATE column defined in Oracle? It doesn't seem to be a DATE otherwise your TO_CHAR would work a bit more better. And the TO_TIMESTAMP function might be a better choice than CAST for the second conversion. Hard to know from this end, not knowing the source datatype or what the contents look like before the conversion attempt.
Please clarify your "gives this" example - gives this where? That's inside the job or from a tool like sqlplus or Toad or... ?
Please clarify your "gives this" example - gives this where? That's inside the job or from a tool like sqlplus or Toad or... ?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Sorry to keep harping on this but when you say it is a date do you mean DATE as in the datatype? Because your extracted date isn't valid and trying to convert that to a DATE fails as expected:
Meaning it should not be possible to store the value you extracted in a DATE field. What do you see when you simply SELECT MYDATE without the TO_CHAR function? Would still suggest you open a support case if you haven't done so already, to see if this is some kind of odd Connector/RCP bug.
Code: Select all
select to_date('00/01/3948', 'mm/dd/yyyy') from dual;
ORA-01843: not a valid month
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Sorry to keep harping on this but when you say it is a date do you mean DATE as in the datatype? Because your extracted date isn't valid and trying to convert that to a DATE fails as expected:
Meaning it should not be possible to store the value you extracted in a DATE field. What do you see when you simply SELECT MYDATE without the TO_CHAR function? Would still suggest you open a support case if you haven't done so already, to see if this is some kind of odd Connector/RCP bug.
Code: Select all
select to_date('00/01/3948', 'mm/dd/yyyy') from dual;
ORA-01843: not a valid month
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers