Transfering Data to an Oracle Database

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Jboyd
Participant
Posts: 15
Joined: Mon Mar 14, 2011 12:55 pm

Transfering Data to an Oracle Database

Post 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.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply