Problem Of Date Conversion in DRS while retrieving data
Posted: Wed Apr 27, 2005 10:35 pm
Hi,
I have a requirement in which I used a userdefined SQL in a Source DRS where I put
select START_DT,END_DT, LATE_START_DT from tablename.The fields have timestamp as the datatype.
I am using 2 databases(SQL Server and Oracle).The data in SQL server is in the format '1900-01-01 00:00:00'.The data in Oracle is of the format '04-Nov-03'.
The Job runs fine in SQL Server.But when I put it in Oracle, it is giving an error
"Attempt to convert String value '04-Nov-03' to Timestamp unsuccessful.
The query from the director is fetching the data perfectly.So this seems to be the problem with the fetching of data by the Source DRS in Ascential
If I modify the user defined Query as
select TO_CHAR(START_DT, 'YYYY-MM-DD HH24:MI:SS'),
TO_CHAR(END_DT, 'YYYY-MM-DD HH24:MI:SS')
from tablename ,
it will work fine in Oracle.But then it will fail in SQL Server since to_char is not a function in SQL Server.
Can anyone please suggest some solution to fix this issue in Oracle rather than using a To_Char function?
Thanks,
Andal
I have a requirement in which I used a userdefined SQL in a Source DRS where I put
select START_DT,END_DT, LATE_START_DT from tablename.The fields have timestamp as the datatype.
I am using 2 databases(SQL Server and Oracle).The data in SQL server is in the format '1900-01-01 00:00:00'.The data in Oracle is of the format '04-Nov-03'.
The Job runs fine in SQL Server.But when I put it in Oracle, it is giving an error
"Attempt to convert String value '04-Nov-03' to Timestamp unsuccessful.
The query from the director is fetching the data perfectly.So this seems to be the problem with the fetching of data by the Source DRS in Ascential
If I modify the user defined Query as
select TO_CHAR(START_DT, 'YYYY-MM-DD HH24:MI:SS'),
TO_CHAR(END_DT, 'YYYY-MM-DD HH24:MI:SS')
from tablename ,
it will work fine in Oracle.But then it will fail in SQL Server since to_char is not a function in SQL Server.
Can anyone please suggest some solution to fix this issue in Oracle rather than using a To_Char function?
Thanks,
Andal