Oracle date formats

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
shilpa79
Participant
Posts: 131
Joined: Thu Jan 20, 2005 5:59 pm
Location: Virginia

Oracle date formats

Post by shilpa79 »

I am trying to insert dates from SQL server to Oracle DB.

--------------------------------------------------------------------------------
Column derivations :
------------------------
---------------------------

Source------------------------------------------->target


SQL SERVER --------------------------------> ORACLE
Cloumn name sql tye ------------- Cloumn name sql type
---------------------------------------------------------------------------------
startdate Timestamp(23,3)-------> st_dt Timestamp(38
enddate Timestamp-------> end_dt Timestamp
upt_dt Timestamp-------> lst_ut_dt Timestamp

-------------------------------------------------------------------------------

I have changed the sql types for the Orcale columns to varchar and used
Timestamp to string function to insert into the table.

TimestampToString(in_lkpBU.StartDate,"%mm-%dd-%yyyy %hh:%nn:%ss")

Still I am getting error while doing that :

"LOOKUP: Type match failure for field ST_DT; APT Schema has string, dbms has type 12."
"LOOKUP: Describe failed because of a missing column for ST_DT"
"main_program: Could not check all operators because of previous error(s)"
"main_program: Creation of a step finished with status = FAILED."

Let me know If I have done anything is not correct
Last edited by shilpa79 on Mon Apr 09, 2007 4:10 pm, edited 3 times in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How about wrapping your description in Code tags (edit your original post) so that the column headings and columns are aligned, and we can see what you mean by your design?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shilpa79
Participant
Posts: 131
Joined: Thu Jan 20, 2005 5:59 pm
Location: Virginia

Post by shilpa79 »

ray.wurlod wrote:How about wrapping your description in Code tags (edit your original post) so that the column headings and columns are aligned, and we can see what you mean by your design?
Can anyone help me out...................... :(
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Did you try pass it as it is? What is the incoming timestamp format?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, we can NOT help you out, because your design is not clear.
Wrap it in code tags, as requested.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shilpa79
Participant
Posts: 131
Joined: Thu Jan 20, 2005 5:59 pm
Location: Virginia

Post by shilpa79 »

My design is

Sqlserverdb----------->Transform--------------->OracleDB

I would like to change the above date columns to load in Orcale . I am working in Parallel not in server .

sample date for the source columns
2007-04-04 00:00:00.000

Thanks,
kjosyula
Participant
Posts: 5
Joined: Mon Apr 09, 2007 5:22 pm

Oracle date formats

Post by kjosyula »

How do you want the output in Oracle?
If you wish to see the data in the output column same as in input the datatype in oracle being varchar, Use TimestampToString(st_dt Timestamp).

Let me know if this answers your question.

-- JK


shilpa79 wrote:My design is

Sqlserverdb----------->Transform--------------->OracleDB

I would like to change the above date columns to load in Orcale . I am working in Parallel not in server .

sample date for the source columns
2007-04-04 00:00:00.000

Thanks,
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Craig has explained "The oracle timestamp phenomenon" so many times. Please search the archives.
Also, what happens if you pass it as it is. The format you are showing is what oracle expects. No formatting might be required.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
shilpa79
Participant
Posts: 131
Joined: Thu Jan 20, 2005 5:59 pm
Location: Virginia

Re: Oracle date formats

Post by shilpa79 »

kjosyula wrote:How do you want the output in Oracle?
If you wish to see the data in the output column same as in input the datatype in oracle being varchar, Use TimestampToString(st_dt Timestamp).

Let me know if this answers your question.

-- JK

I have changed the sql types for the Orcale columns to varchar and used
Timestamp to string function to insert into the table.

TimestampToString(in_lkpBU.StartDate,"%mm-%dd-%yyyy %hh:%nn:%ss")

Still I am getting error while doing that :

"LOOKUP: Type match failure for field ST_DT; APT Schema has string, dbms has type 12."
"LOOKUP: Describe failed because of a missing column for ST_DT"
"main_program: Could not check all operators because of previous error(s)"
"main_program: Creation of a step finished with status = FAILED."


Thats wht I mentioned in my first draft that I tried .......................
Anyway I will check .....................

Thanks,
Post Reply