Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lookup issue

Status
Not open for further replies.

kautya007

Programmer
Apr 19, 2010
1
US
i have prepared a lookup named lkp_op_number. in that i have given a query as
select max(op_number),material from material_inhouse group by material. i am returning op_number. in the expression i have varriable called max_op_no in which i am calling lookup. max_op_number is compared with op_no(column name) and if matched then set value as say 1 else 2.
when i run the workflow the value for else means 2 is inserted for the all records. means the value for max_op_no is not there. what should i do? so that my workflow will give proper output
 
1. AFAIK you need to work with an alias if you return an aggregate.
2. The idea of a lookup is that you evaluate a column from the lookup against a column from the dataflow. Another column value from the lookup is then set as return value. If more than one match exists the first or last value is returned. In your case you have no control over the returned value.
3. Why perform an aggregate against the material column and not use material in the relationship between dataflow and lookup?

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top