Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2006, 02:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ~Bean~
Default Multiple Inserts

Is there a way to do multiple inserts into a table at once based on the rows from a second table (using a sp)?

I have tables: users, user preferences, and preference list. The preference list table is customizable by Admins. When we add a user to the system I want to add the user to the user table (this I have already), then add entries for that user to the user preferences table FOR EACH row in the preferences list table that is flagged.

Make sense?

-------------------------
Beware of programmers with screwdrivers...
__________________
-------------------------
Beware of programmers with screwdrivers...
 
Old January 20th, 2006, 03:00 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ~Bean~
Default

I found an answer that seems to work in the wrox archive:

http://p2p.wrox.com/archive/sql_language/2002-12/5.asp


-------------------------
Beware of programmers with screwdrivers...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 8 inserts 2 records... nickLogan BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 May 27th, 2009 06:32 AM
inserts fbailey Classic ASP Databases 3 February 22nd, 2007 02:39 PM
no inserts for you sadermine VB.NET 1 September 5th, 2005 10:05 PM
Trigger support for multiple Inserts kim3er SQL Server 2000 1 November 6th, 2004 02:51 AM
Script with inserts zee_ahmed2002 SQL Server 2000 2 October 19th, 2004 04:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.