我使用下面的脚本手动插入订单交易。此脚本一次处理一个订单(@orderId - 在此处使用此变量)。我有 200 个订单的列表,有没有办法可以使用单个脚本处理所有订单?
DECLARE @return_value int, @exceptionId bigint, @createDate datetime
EXEC @return_value = [dbo].[uspInsertException]
@exceptionTypeCode = N'CreateCustomerAccount',
@exceptionSource = N'SOPS',
@exceptionCode = N'PUSH2EQ',
@exceptionDescription = N'CreateCustomerAccount exception MANUALLY pushed to EQ',
@request = N'',
@response = N'',
@orderId = 227614128,
@sourceSystem = N'OMS',
@exceptionStatusCode = N'Open',
@actorId = 1,
@exceptionSubTypeCode = NULL,
@exceptionId = @exceptionId OUTPUT,
@createDate = @createDate OUTPUT
SELECT @exceptionId as N'@exceptionId', @createDate as N'@createDate'
SELECT 'Return Value' = @return_value