doug-583247 (4/26/2015)
Thanks for the suggestion Eirikur, but that still produces a syntax error as shown below. I then removed the semicolon and then the syntax error moved the " near 'QuoteId' "Doug
My bad, forgot the END
😎
Create Trigger trgInsertSalesForce
on dbo.CustomerQuote
AFTER Insert
as
BEGIN
Update CQ
set CQ.SalesForceId = (select
SalesForce.SalesForceId
FROM SalesForce
INNER JOIN
TKOUser ON SalesForce.SalesForceName = TKOUser.UserName
inner join CustomerQuote on CustomerQuote.UserId = TkoUser.UserId)
From Inserted I
INNER JOIN CustomerQuote CQ
ON I.QuoteId = CQ.QuoteId;
END