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

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -