Date Selection Issue

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Date Selection Issue

Post by dodda »

Hi,

I am Trying to select the calculated Date Filed which is calculated by adding the Time Portion to the existing Date Time Filed.Below is the Select statement which i am giving in Oracle OCI data Stage.I want to select End_Date which should be Time STamp and shoul write into Tartget as Time Stamp.When i Run this Query in Data BAse i Geetiinng the Date time but when i Run the DAta Stage Job i am Ending up With Error.Please let me know how ishould i Handle in Data STAge

to_char((AA_time_stamp+AA_CALL_DURATION/86400),'YYYY-MM-DD HH24:MI:SS') END_DATE

here AA_Time_STamp is DAte Time and CALL duartion is numeric value which represents seconds

Eg:AA_TIME_STAMP='2008-02-25 15:48:39',AA_CALL_DURATION=4
Result should be END_DATE='2008-02-25 15:48:43'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does this work with DataStage not involved in the process, for example in TOAD, SQL Navigator or sqlplus ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

Yes This Is working Perfectly Fine in SQL developer and PL/SQL developer......

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Date Selection Issue

Post by chulett »

dodda wrote:but when i Run the DAta Stage Job i am Ending up With Error.
Please Post the Actual Error.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Re: Date Selection Issue

Post by dodda »

The error was when i actually define END_DATE as varchar DataType in Data Stage it is returning me Results but when i try to view the Data it is just diplaying some numerical values in the View Data but when i define that Field as Time Stamp Data Type it is Returning with Error Msg as Conversion to Time Stamp FAiled.When i Execute the SAme Query in SQl Developer it is Returing The Actual Result


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

Post by ray.wurlod »

We need to see the exact wording of the error message that DataStage generates in order to be of any useful help.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

We need to see the exact wording of the error message that DataStage generates in order to be of any useful help.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

I FOund out the Problem.The Issue was Very Simple the User Defined Query contains Repetive Column which is Causing the Error.Thanks all for Participating in this ISSUE.
Post Reply