I am trying to pull a field off of a DB2 table, that contains just one value. It contains nothing but a counter that I need to pull off for each record I process. The problem I am running into is that this table does not contain a key to lookup on. I simply need to select the field off of the table and then carry that field on in my processing. There are no lookup keys to use. And when I use the lookup stage, it asks what my lookup key is...and I do not have one. Can I use a lookup stage to access a DB2 without keys? Or is there another stage I can use?
Thanks for your help!
Using lookups without specifying lookup keys
Moderators: chulett, rschirm, roy
You can use the sparse mode lookup
You can use the sparse mode in the looku stage to overcome this problem
Hi RStone,
As Craig mentioned you need to make up one. Just before the lookup stage add a column generator stage and add a column with value 1. When you are select from DB2 select the counter as well as an alias column with value equal to 1. Now you can use this common column name from the main stream and lookup stream as the key column and retrieve the counter value.
HTH
--Rich
Pride comes before a fall
Humility comes before honour
As Craig mentioned you need to make up one. Just before the lookup stage add a column generator stage and add a column with value 1. When you are select from DB2 select the counter as well as an alias column with value equal to 1. Now you can use this common column name from the main stream and lookup stream as the key column and retrieve the counter value.
HTH
--Rich
Pride comes before a fall
Humility comes before honour
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: