Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all visitors,
I want to create one store procedure in sql server 2005.this store can insert data to 2 table(table master and table detail).
The problem is table master can insert 1 row but detail table can insert n rows.
How can i insert to detail table with that store?

Thanks,
TONY
Posted
Comments
wizardzz 11-Jan-12 23:45pm    
Tony, have you considered a loop?
manognya kota 11-Jan-12 23:51pm    
Hi,
Can you tell what exactly varies in master and detail tables?Please post some inserts to your master and corresponding inserts to detail..
Tejas Vaishnav 12-Jan-12 0:56am    
Provide the table structure of Master and Detail....

1 solution

Dear Tony,

This link will definitely help you out:-

http://www.dotnettreats.com/tipstricks/howtodal1.aspx[^]

Don't forget to mark this as your answer if it helps you out.

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900