CREATE TRIGGER trUpdateData_received
ON UPLOAD_TABLE
FOR UPDATE
AS
UPDATE UPLOAD_TABLE
SET Data_received = GETDATE()
FROM UPLOAD_TABLE t1
INNER JOIN inserted i ON t1.Upload_id= i.Upload_id



CREATE TRIGGER trDowndateData_received
ON DOWNLOAD_TABLE
FOR UPDATE
AS
UPDATE DOWNLOAD_TABLE
SET Data_sent = GETDATE()
FROM DOWNLOAD_TABLE t1
INNER JOIN inserted i ON t1.DOWNload_id= i.DOWNload_id