0
(使用SQL Server 2014)更新表与复杂的分组另一个表的计数
我有两个表
1) Vendors
a. VendorName (PrimaryKey)
b. ClientCount
2) Payments
a. VendorName (ForeignKey)
b. ClientID
我想更新Vendors.ClientCount以独特的客户端ID对数付款中的VendorName。我确信这很容易做到,但三个小时的徘徊让我相信我不够简单。