Hi,
I have loaded a field(Eg:-2006-07-21) into the Oracle(10g) table as
To_date(Field)(I have inserted using an user defined query).
In another job when i try reading it from the loaded table,I am having a problem if i specify that field as date and read it.If i use a timestamp datatype to that field i am able to read it.
I could not even read the field as a string.
I have tried using a To_Char function to the query and read it but its not reading.
The same i have tested using a dynamic RDBMS it data is read if i use a to_char(field) in my query.
Any inputs most appreciated.
Regards,
Bala.
Reading date data from Oracle
Moderators: chulett, rschirm, roy
Re: Reading date data from Oracle
You're saying that it works using an RDBMS stage but doesn't using some other unnamed stage. To be complete, rather than have people assume they know what the other stage is, how about you give some specifics? Name that stage!bala_135 wrote:The same i have tested using a dynamic RDBMS it data is read if i use a to_char(field) in my query.
Specific examples of your issue would help too. For example, any Oracle field can be 'read as a string', including date fields. That just gets it for you in the NLS format of the particular instance, so not sure why that would be a problem.
ps. In case you're not aware, the date is not stored as '2006-07-21' in the Oracle DATE field, it is internalized. That's just the format you used to load the data and has no bearing on how you get it back out again. FYI.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers