General information
Forum:
Microsoft SQL Server
Title:
Update multiple rows
Hi,
I have 2 tables in SQL server 'ordhead' and 'ordlines' related by idord.
On relation there are cascading delete from ordhead to ordlines.
Table ordlines have a trigger for insert, update and delete to update table 'stock' related by idsku.
When I delete a line from table ordhead, by cascading, all lines from table ordlines are deleted. In delete trigger I receieve the deleted lines in cursor 'deleted'.
In order to update table stock I need to update for all lines from cursor 'deleted'. How to do this? How to write the UPDATE statement?
Thanks in advance.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only