Oracle date-type column import & decimal conversion

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
arun_im4u
Premium Member
Premium Member
Posts: 104
Joined: Mon Nov 08, 2004 8:42 am

Oracle date-type column import & decimal conversion

Post by arun_im4u »

Hi,

When i try to import column definitions from an oracle table using Orchestrate schema definitions it converts all the date type fields into timestamps.

I have to load these columns into a numeric column in the target table.

Question 1: How can I import date type column as date?? Does DS support that?

Question 2: If it got imported as timestamp how can I convert that into decimal? I tried the Timestamptostring(stringtodecimal). But not able to make it work. Timestamp column format= 7/31/2004 Target column: 20040731.

Thanks.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage but Oracle doesn't. When DataStage asks Oracle what the SQL data type is, Oracle reports "timestamp". A DATE column in Oracle is actually a date and time column, as you may be aware.

To convert the date part you therefore first need to extract the date part from the timestamp.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply