xcaliber2222
Programmer
Hello,
I have two tables, each with an audit trail trigger. It is copying two field values I need to the destination (audit) trail table. What I'm not sure how to do is grab the value of the table that the values are actually coming from. If someone could please show me how to do this or point me in the right direction I would really appreciate it.
Here is what I have so far:
CREATE TRIGGER trAuditTrail ON
[dbo].[tbl_Test_1]
FOR INSERT
AS
INSERT [dbo].[tbl_Audit_Trail]
(
claim_number,
source
)
SELECT
clmno,
--source (table)
FROM inserted
Same trigger on [tbl_Test_2]
Thanks,
Alejandro
I have two tables, each with an audit trail trigger. It is copying two field values I need to the destination (audit) trail table. What I'm not sure how to do is grab the value of the table that the values are actually coming from. If someone could please show me how to do this or point me in the right direction I would really appreciate it.
Here is what I have so far:
CREATE TRIGGER trAuditTrail ON
[dbo].[tbl_Test_1]
FOR INSERT
AS
INSERT [dbo].[tbl_Audit_Trail]
(
claim_number,
source
)
SELECT
clmno,
--source (table)
FROM inserted
Same trigger on [tbl_Test_2]
Thanks,
Alejandro