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.
Need an optimized solution
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: