cricketer1
Technical User
I have the following update statement which is basically updating few fields in one table with another table. This runs fine as a statement on my test DB server and even on the live Db server, but when I put it on a live DB server as a stored procedure, it dies out on me. What could be going wrong. The table being updated is used in Order Level transaction, so there are other updates gong on, could there be a locking issue.
UPDATE AL_INVENTORY
SET AL_STATUS = STATUS,
AL_AVAILABLE_QTY = INVENTORY,
AL_AVAILABLE_DATE = AVAILABLE_DATE
FROM tbl_Inventory_Temp T
WHERE T.PROD_ID = PRODUCT_ID
AND T.CHOICEVALUE_COLOR_ID = AL_COLOR_CHOICE
AND T.CHOICEVALUE_SIZE_ID = AL_SIZE_CHOICE
Please advice how best to tackle such a situation.
Thanks
UPDATE AL_INVENTORY
SET AL_STATUS = STATUS,
AL_AVAILABLE_QTY = INVENTORY,
AL_AVAILABLE_DATE = AVAILABLE_DATE
FROM tbl_Inventory_Temp T
WHERE T.PROD_ID = PRODUCT_ID
AND T.CHOICEVALUE_COLOR_ID = AL_COLOR_CHOICE
AND T.CHOICEVALUE_SIZE_ID = AL_SIZE_CHOICE
Please advice how best to tackle such a situation.
Thanks