Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Lock conflict


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jan 15, 2017 4:54 AM Last Post By: Melissa Torn
Melissa Torn

Posts: 143
Registered: 4/30/09
Lock conflict  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 15, 2017 3:50 AM
I am trying to update stock qty in ITEMS table
ItemMovements is a View and has all movements of all items
when i try below query i am getting
"Error at line 1 lock conflict on no wait transaction deadlock"
error message, can someone please help ?

UPDATE ITEMS IT
SET
IT.INCOME=(SELECT SUM(IM.INCOME) from ITEMMOVEMENTS IM WHERE IT.ITEMNO=IM.ITEMNO),
IT.OUTGO=(SELECT SUM(IM.OUTGO) from ITEMMOVEMENTS IM WHERE IT.ITEMNO=IM.ITEMNO),
IT.STOCK=(SELECT SUM(IM.INCOME-IM.OUTGO) from ITEMMOVEMENTS IM WHERE IT.ITEMNO=IM.ITEMNO)

Thank you
Melissa Torn

Posts: 143
Registered: 4/30/09
Re: Lock conflict  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 15, 2017 4:54 AM   in response to: Melissa Torn in response to: Melissa Torn
I solved my problem
Thank you
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02