September 7, 2009 at 6:13 am
Hi to all , I have this trigger , when I want to delete a record from the table im getting the below error.
--- This the trigger
ALTER trigger [Cards].[Delete_DamagedCategory1]
On [Cards].[DamagedData]
After Delete
AS
Update Cards.Quantity set Cards.Quantity.Quantity = (Quantity + (select Quantity from Deleted)) where CategoryID in
(Select CategoryID from Deleted ) and AssemblyUnitID in (Select AssemblyUnitID from deleted)
and WareHouseID in ( Select WareHouseID from Deleted) and BranchID=(Select BranchID from Damagedcategory
where DamagedID in ( Select DamagedID from Deleted where ID in (Select ID from Deleted)))
-- This is the error :
((Msg 512, Level 16, State 1, Procedure Delete_DamagedCategory1, Line 5
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.))
So , Im waiting for your Solution
September 7, 2009 at 6:28 am
Duplicate Post:
Please post your replies to
http://www.sqlservercentral.com/Forums/Topic783736-338-1.aspx?Update=1%5B/url%5D
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply