I'm getting this error when I trying to create a purchase order and/or transfer inventory out.
Store Operations Business Rules
Error #-2147217833
The statement has been terminated.
(Source: Microsoft OLE DB Provider for SQL Server)
(SQL State: 01000)
(NativeError: 3621)
No Help file available
SELECT
ItemID,
SUM(CASE POType
WHEN 0 THEN QuantityOrdered - QuantityReceivedToDate
WHEN 1 THEN QuantityOrdered - QuantityReceivedToDate
WHEN 2 THEN QuantityOrdered - QuantityReceivedToDate
WHEN 3 THEN -QuantityOrdered + QuantityReceivedToDate
WHEN 4 THEN QuantityOrdered - QuantityReceivedToDate
WHEN 5 THEN -QuantityOrdered + QuantityReceivedToDate
END) As OnOrder
INTO ##TempQuantity
FROM PurchaseOrderEntry
INNER JOIN PurchaseOrder ON PurchaseOrder.ID PurchaseOrderEntry.PurchaseOrderID
WHERE (PurchaseOrder.Status <> 2) AND (QuantityReceivedToDate <
QuantityOrdered) GROUP BY ItemID
UPDATE ##TempOrder
SET QuantityOrdered CASE WHEN Item.Quantity - Item.QuantityCommitted <= Item.ReorderPoint
THEN
ISNULL(Item.RestockLevel - (Item.Quantity - Item.QuantityCommitted +
ISNULL(##TempQuantity.OnOrder, 0)),
This is followed by an OK button. When I click OK, I receive a second
error message:
Store Operations Manager
Run-time error '5':
Invalid procedure call or argument
Also followed by an OK button, which when clicked, exits Store Operations
Manager. This error is only occurring on one Department, and did not occur
on Monday when this Department was last ordered. Does anyone know what
causes this error, and how can it be fixed?
*This post is locked for comments