sql - How to get value from 'from' table in OUTPUT part of the query -
this query:
insert translated output @changeid,inserted.resourceid,project,inserted.translatedvalue backup select newid(),resourceid,translatedvalue,getdate() resources project ='blahblah'
right cant value of project in output part because it's resources table not inserted, there easy way value without modifying structure of query?
the output clause can refer inserted row. update backup table after query.
update b set project = r.projcet backup b join resources r on b.resourceid = r.resourceid b.project null
Comments
Post a Comment