Hi,
I am doing a simple lookup:
Database
v
v
Dataset>>>>Lookup>>>>>Dataset
In the Database i am having the data as
ID POS DEPT
1 QA FIN
2 QA FIN
3 QA FIN
1 BA DIN
3 BA DIN
and the source is having data like
ID Name1 Name2
1 A AA
2 B BB
3 C CC
The key is ID for lookup.I want only 3 rows in the output like
ID POS1 POS2 Name1
1 QA BA A
2 QA B
3 QA BA C
ANY HELP IS APPRECIATED
THANKS
SAM
Lookup Condition not correct
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
Hi Ray,ray.wurlod wrote:There is no common key on which a lookup can be based. Please describe the algorithm you would use to generate the output if DataStage were not available.
I can do this thing by doing the lookup based on ID and allowing "Multiple rows" through the lookup link.
ID POS Name1
1 QA A
1 BA A
2 QA B
3 QA C
3 BA C
After this i am getting stuck on how to convert this multiple rows into a single row.
Any Help is appreciated
Thanks
sam
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This technique is called a vertical pivot - a search will reveal a few approaches that people have taken to it. It's tricky to do in parallel jobs and retain parallelism.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
Hi
Can somebody tell me what this Error means.
Thanks
sam
Can somebody tell me what this Error means.
Code: Select all
Lkp_Num_Cards: When checking operator: Operator of type "APT_LUTCreateOp": will partition despite the
preserve-partitioning flag on the data set on input port 0.
sam
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
Hi Sam,
By default the previous stages would have a setting of propogating the existing partition to the following stages. But you would have defined a new partitioning for the following stage.
So DataStage gives a warning stating that the existing partiton cannot be preserved and rather the new partition will be used for that particular stage.
HTH
--Rich
By default the previous stages would have a setting of propogating the existing partition to the following stages. But you would have defined a new partitioning for the following stage.
So DataStage gives a warning stating that the existing partiton cannot be preserved and rather the new partition will be used for that particular stage.
HTH
--Rich