I need help - I am trying to create a trigger to do the following:
When I run the query shown below all the records in Tbl_Points are set to the first value it finds and thus not doing a muti-record update
Any assistance on what I am doing wrong is most welcome
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- I need to update the Tbl_Points with the Trans_Date from the Tbl_Transaction_Asset_Latest
-- The field to update is in table Tbl_Points field PDA_Notes5 and needs to use
SET PDA_Notes5 = Tbl_Transaction_Asset_Latest.Trans_Date
--get records from tbl_transaction_Latest
where (Tbl_Transaction_Asset_Latest.Point_ID = Tbl_Points.Point_ID and Clone_Id = 'C000000018' AND EXISTS ((SELECT Tbl_Points.Point_ID FROM Tbl_Points WHERE Point_ID = Tbl_Transaction_Asset_Latest.Point_ID))
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL).
Depending on business requirements, a single Stored Procedure can return differe…