set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER TRIGGER [Falmer] ON [dbo].[Income] AFTER INSERT AS Declare @stn_no int,@st_quan bigint,@st_sanf bigint DECLARE c1 CURSOR FOR select Income.sotre_no,Income.plus_quan,store.sanf_quan from dbo.Income join dbo.store on store.store_no=Income.sotre_no begin OPEN c1 FETCH NEXT FROM c1 INTO @stn_no, @st_quan ,@st_sanf update dbo.Store set store.sanf_quan=@st_sanf+@st_quan where store.store_no=@stn_no CLOSE c1 DEALLOCATE c1 end
ما هي مشكله هذا الكوددددددددددد
اريد الحل
