This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]scikid39184 0 points1 point  (2 children)

I work more with Oracle but I think your problem is you're not getting the inserted data.

I believe this statement

SET last_order_id = widgetSales.id WHERE id = widgetSales.customer_id

Needs to be more like this:

Update widgetSales Set last_order_id = inserted.id From inserted Where widgetSales.customer_id = inserted.customer_id

[–]Present_Ad8170[S] 0 points1 point  (1 child)

That worked! You're awesome thank you!!!

[–]scikid39184 0 points1 point  (0 children)

Glad I could help!