Hi,
I have two Keys in My Lookup Table. I Load My input data only by checking the first column in the lookup table. The value of the other column is used for calculations. It is highligted in red...how can i correct this ?
Key Expression
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
If you don't want to use the second column in the lookup table, then uncheck key option for that column. Isn't it that easy? That will get rid of your "highlighted in red" problem. Plus you can retrieve the second column as an output incase of a successful look up and use for your calculations further.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Hi Buddy,
you can only make thouse column key which you are using to lookup(mapping). just make your red column to not-key column in table definition. thats all.
it will not show that coloumn in red.
Deepak
you can only make thouse column key which you are using to lookup(mapping). just make your red column to not-key column in table definition. thats all.
it will not show that coloumn in red.
Deepak
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Re: Key Expression
unfortunately it's not that straight forward....I have tried it that way...but when I uncheck it the Hash File does not get updated.
cosec wrote:Hi,
I have two Keys in My Lookup Table. I Load My input data only by checking the first column in the lookup table. The value of the other column is used for calculations. It is highligted in red...how can i correct this ?
Based on your reply,I'm assuming your lookup data is in the hashed file. You cannot change the keys in hashed file. If you have defined two columns as key columns while loading you have to use the same columns as keys while reading. Else, you will get incorrect data.
Other option will be to load data into a table without constraints and have non-unique index defined on the lookup column.
Other option will be to load data into a table without constraints and have non-unique index defined on the lookup column.
Hi Shiva,
I need to change the value of the incoming second key based on the look up....and havent figured it out yet...trying different scenarios
I need to change the value of the incoming second key based on the look up....and havent figured it out yet...trying different scenarios
shiva459 wrote:Based on your reply,I'm assuming your lookup data is in the hashed file. You cannot change the keys in hashed file. If you have defined two columns as key columns while loading you have to use the same columns as keys while reading. Else, you will get incorrect data.
Other option will be to load data into a table without constraints and have non-unique index defined on the lookup column.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The second key is red because the GUI doesn't permit doing this. Even so, it will compile and run successfully if the key expression is syntactically valid. Right click and choose Validate Expression.
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.
Well the syntax is all fine....but the thing is I dont want the second key to be validated just want it passed to the output....
ray.wurlod wrote:The second key is red because the GUI doesn't permit doing this. Even so, it will compile and run successfully if the key expression is syntactically valid. Right click and choose Validate Expressio ...