CREATE TRIGGER Trigger1 ON job -- basetable
FOR INSERT
AS
INSERT INTO ClientInstruction (ClientOrganizationID,Summary,DateInstructed,ClientInstructionNo,jobid)
SELECT ClientOrganizationID,InstructionComments, DateInstructed ,ClientInstructionNo,jobid
FROM INSERTED -- fetch from base table (data)
FOR INSERT
AS
INSERT INTO ClientInstruction (ClientOrganizationID,Summary,DateInstructed,ClientInstructionNo,jobid)
SELECT ClientOrganizationID,InstructionComments, DateInstructed ,ClientInstructionNo,jobid
FROM INSERTED -- fetch from base table (data)
No comments:
Post a Comment