Small clarfication :Embedding oracle code with Range lookup

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
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Small clarfication :Embedding oracle code with Range lookup

Post by Ragunathan Gunasekaran »

Hi ,
I have two keys from the source and three keys in my Look up oracle table.
Key1 in the source table should be equal to Key 1 in the lookup table ...This is achievable just by mapping the two columns in the transformer and would be automatically passed to the Where clause of the Oracle stage.
But Key2 in the source should be between Key2 and Key3 in the lookup, I have achieved this by amending the SQL code as

Code: Select all

 WHERE ... AND (?2 <= Table_Name.Key2 and ?2>=Table_name.Key3)
Will this specification
?2
would be correct. So that it signifies the second key column passed to the where clause of the table.

Kindly clarify it please
Regards
Ragu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, it doesn't. In the OCI stage :2 would represent the second column, anywhere else the second ? in the 'where' clause would be mapped to the second Key column. Meaning, outside of the OCI stage with its numbered bind parameters, you'd need to pass the value in twice to achieve this. FYI.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply