Look-Up for a Complex Logic

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
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

Look-Up for a Complex Logic

Post by pavans »

Hi All,

In one part of my job design I have a snippet of data in the below format:

Table1:
Col1 Col2 Col3
100 2000 1
101 2001 1
102 2002 1
103 2002 1

Table2:
Col1 Col2
1 DK
2000 9200
2001 9300
2002 9400

Target Should be:

Col1 Col2 Col3
100 9200 Dk
101 9300 Dk
102 9400 Dk
103 9400 Dk


I was trying to do a lookup using col3 in table 1 to col1 in table 2 first and then col2 in table1 to col1in table2.
But was unable to get the expected result.

Any ideas or help is greatly appreciated.
Thanks,
Pavan
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

Re: Look-Up for a Complex Logic

Post by pavans »

pavans wrote:Hi All,

In one part of my job design I have a snippet of data in the below format:

Table1:
Col1 Col2 Col3
100 2000 1
101 2001 1
102 2002 1
103 2002 1

Table2:
Col1 Col2
1 DK
2000 9200
2001 9300
2002 9400

Target Should be:

Col1 Col2 Col3
100 9200 Dk
101 9300 Dk
102 9400 Dk
103 9400 Dk


I was trying to do a lookup using col3 in table 1 to col1 in table 2 first and then col2 in table1 to col1in table2.
But was unable to get the expected result.

Any ideas or help is greatly appreciated.

I have got the logic.
Thanks,
Pavan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Care to post it? Would help future searchers with the same question.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Apart from the change of case it looks like an ordinary, regular, key-based lookup to me.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Shhhhhhh....
-craig

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