I have a stored procedure that returns a pair of output parameters - the ID and the computed value. Is it possible to use a trigger with an insert statement, that inserts those two values directly? Something like this
CREATE TRIGGER Trig_FirstTable ON SecondTable AFTER UPDATE
AS
BEGIN
INSERT INTO FirstTable (OtherID, OtherValue)
VALUES (@otherID, @otherValue)
FROM StoredProcedure inserted.ID, inserted.Value, @otherID OUTPUT, @otherValue OUTPUT
END
SecondTable?inserted, then call your procedure and then insert into theFirstTable