Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
metser
Starting Member
27 Posts |
Posted - 2005-06-22 : 10:55:38
|
Hello (again). I'd appreciate your help here...I have a form on my Website, where a Reseller enters his details, PLUS a list of companies he works with (using a checkbox for each company). On the DB side, I have 3 tables: a RESELLERS table, a COMPANIES table and a RESELLERS_COMPANIES junction table (for the many to many relationship). Now, when the Reseller submits the form, I get a LIST of companies he works with (any number of companies between 1 and 20). I therefore need to "loop" this "list", and INSERT each one to the junction table in a new row (the tables holds the Reseller_ID and the Company_ID). How do I do this? can it be done with one stored procedure? (again - I do not know in advance how many companies the reseller will choose when filling out the form). |
|
Thrasymachus
Constraint Violating Yak Guru
483 Posts |
Posted - 2005-06-22 : 11:33:51
|
What are you developing your web pages with?Sean RoussyPlease backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own.I am available for consulting work. Just email me though the forum. |
|
|
metser
Starting Member
27 Posts |
Posted - 2005-06-22 : 11:44:46
|
Working with ASP (not .NET), and SQL Server 2000 |
|
|
X002548
Not Just a Number
15586 Posts |
|
metser
Starting Member
27 Posts |
Posted - 2005-06-23 : 00:48:30
|
Great! Thanks Brett! |
|
|
|
|
|