Larry Brister
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER