如果我的销售订单为68,并且salesorderprexies不是'SO-'或'QU-',则尝试将salesorders.pickinglocation设置为448。我收到了一个sytax错误。
DECLARE @SalesOrder bigint = 68 --[Identifier]
DECLARE @PickingLocation bigint = 448
set SalesOrders.PickingLocation = @PickingLocation
FROM SalesOrderItems
inner join salesorders on salesorderitems.salesorder = SalesOrders.SalesOrder
inner join SalesOrderPrefixes on salesorders.salesorderprefix = SalesOrderPrefixes.salesorderprefix
WHERE SalesOrders.Salesorder = @SalesOrder
AND SalesOrderPrefixes.SalesOrderPrefixId <>'SO-' AND SalesOrderPrefixes.SalesOrderPrefixId <> 'QU-'