stored procedures - Bulk insert using Merge and output clause in SQL Server 2008 -
i have table1 has 1 column primary key , have table2 has 2 columns , 5 rows. need bulk insert table1 depending on rows in table2 , retrieve inserted row need use table 3. can 1 me on ?
table 2 - sourceitem
sourceid sourcelocation sourceamount soucename feedname -------------------------------------------------------- 1 london 3000 process monthly 2 swindon 2500 process monthly 3 bristol 500 process monthly 4 hatfield 1000 process monthly 5 leeds 3000 process monthly table1: grain
grainid i need insert rows in grain table based on number of rows sourceitem table , need retrieve grainid inserted can use inserted value in different table
Comments
Post a Comment