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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -