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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Inserting Data into Multiple tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-07-25 : 08:46:57
Anthony writes "Is it possible to insert data into multiple tables using a single query? I used the following query to submit data into the sample Northwind database for a SQL 7.0, but the query returned the infamous:

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near ','.

Do you have any ideas???


Insert INTO [Order Details], Customers, Products(OrderID, ProductID, UnitPrice, Quantity, Discount, CustomerID, CompanyName, ContactName, ContactOwner, ContactTitle, Address, City, Region, Postal Code, Country, Phone, ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued)
Values('11078', '80', '16','2', '0.05', 'WHIT4576', 'ADW', '[Anthony White]', '[Anthony White]','Owner', '[4610 118th Ave SE]', 'Bellevue', 'WA', '98006', 'USA', '[(425) 373-4866]', '78', 'ADW', '29', '2', '[62 Boxes]', '5', '50', '0', '15', '0')

Thanks,

Anthony"
   

- Advertisement -