Need an optimized solution

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
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Need an optimized solution

Post by ag_ram »

All,
Requirement:
I have two different queries to be executed in a DB Stage(Oracle) depending upon the value of the user defined parameter(ModeOfSchedule) But the metadata of SQL execution is same. The syntax of the Queries is,
Query1:(ModeOfSchedule="MID")
Select T1.C1, T1.C2, T2.C3, T3.C4 from Table1 T1, Table2 T2, Table3 T3 Where Cond1 And Cond2 And Cod3
Query2:(ModeOfSchedule="EOD")
Select T1.C1, T1.C2, T2.C3, T2.C4 from Table1 T1, Table2 T2 Where Cond1 And Cond2
Note: Data type of T3.C4 and T2.C4 is same(Data Type:T3.C4=T2:C4).
Possible Solution:
Select and pass one of the SQL queries as parameter value after finding the value of ModeOfSchedule.but seems uncomfortable.
Please sugest me to go ahead with any other solution by DataStage or DB(Oracle) statements.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

One job for each and a job sequence to make the decision.
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