Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Dynamic update statement in INSTEAD OF UPDATE trigger

$
0
0
It is possible to use dynamic base table update statement in INSTEAD OF UPDATE trigger. I have a wide table (more then 100 columns) and so I don't know, how to forward updates to only really updated columns of base table. Dynamic SQL in trigger cannot access to inserted table. Copying inserted to #inserted then building dynamic update statement based on columns_updated() function leads trigger recursion, not direct base table updating. Update statement in INSTEAD TRIGGER cannot vary updated columns list. Is there any workaround?

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>