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
Microsoft SQL ServerMicrosoft SQL Server 2008Microsoft SQL Server 2005

Avatar of undefined
Last Comment
Larry Brister

8/22/2022 - Mon
SOLUTION
Sean Stuber

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
zephyr_hex (Megan)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Larry Brister

Thanks folks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck