Page 1 of 1

Transfering Data to an Oracle Database

Posted: Tue Jun 28, 2011 8:26 am
by Jboyd
I created a parallel job that is taking data from SQL Server doing some tranformations and such on the data but I am never changing data types. Once it goes into Oracle I can no longer see the Timestamp it is only a date in Oracle SQL Developer. Is this a problem in my job aka DataStage or is there an issue when placing a Timestamp into Oracle.

The think the main problem I am having is that my logic is not working for picking data with the most recent date. I cannot verify because I cannot see the timestamp to see which date is more recent if it is on the same day.

Let me know if this is not clear enough to understand.

Thanks.

Posted: Tue Jun 28, 2011 10:39 am
by jwiles
Oracle's default view for date datatypes is 'DD-MON-YY'. You can use the to_char() function in your SQL to convert it to a formatted varchar2 which contains the time as well.

to_char(date,format_string)

http://download.oracle.com/docs/cd/B193 ... htm#i34510

Regards,

Posted: Tue Jun 28, 2011 11:04 am
by chulett
Better to check the actual NLS_DATE_FORMAT in play in the target database. Best to do your work "format agnostic" and stick with a standard format like YYYY-MM-DD HH24:MI:SS and leverage the TO_DATE() function in your target SQL. All IMHO, of course. :wink: