我有一个更新一些行文的SP,我想更新一下我自己在选择中的立场的SortOrder栏——这里是我的法典的一部分:
UPDATE StagingCategoryItems
SET IsDeleted = 0,
ModifiedOn = GETDATE(),
ModifiedBy = DragDropSP
WHERE ItemID IN (
SELECT ItemID
FROM StagingCategoryItems
WHERE ManufacturerID=@ManufacturerID
AND CategoryID=@CategoryID
AND ItemID IN
(
SELECT items
FROM dbo.Split(@InIds, , )
)
AND IsDeleted=1
)
AND ManufacturerID=@ManufacturerID AND CategoryID=@CategoryID
因此,我要补充说:
SortOrder = POSITION_IN_SELECT_RESULT
我如何做到这一点?