Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

lookup issue

lookup issue

lookup issue

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

RE: lookup issue

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close