Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Update with min id from group

I have a table that after select is in proper order.
ID     VendorID   PrimaryID     isRank
11         1000           NULL              1
12         1000          NULL              2
13         1000           NULL              3
14         1003          NULL               1
15         1003           NULL              2

In EACH VendorID "Group" I need to set all of the PrimaryID's = ID of the isRank = 1 in the group

Results would be like this
ID     VendorID   PrimaryID     isRank
11         1000           NULL              1
12         1000          11                     2
13         1000           11                   3
14         1003          NULL               1
15         1003           14                   2
SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Larry Brister

ASKER

Thanks folks