Is there anyway to update variable tables using SQL triggers?
I have one table called Readings that is updated with multiple different point numbers, I would like to have a trigger on this table that will read this point number and then update the specific table.
I have the following trigger that works, but the table name Z01 I would like to be a variable depending on the inserted data. Is this possible?
CREATE TRIGGER [dbo].[TRG_InsertTest]
ON [dbo].[readings]
AFTER INSERT AS
BEGIN
INSERT INTO Z01
SELECT * FROM INSERTED
END
Z01should be appearing as the data for (some column) in the single table that should be containing all of this data.