Multiple Rows In SQL Query

Learn2010

Registered User.
Local time
Today, 08:18
Joined
Sep 15, 2010
Messages
415
I have been trying to use the SQL view in a query to append multiple rows to a table. I have had no luck. Any suggestions?

Thank you.
 
What's the SQL of the query?
 
INSERT INTO Art (ID, FirstName, LastName, DOB, Phone, Rate, Hours, Pay)
VALUES
(3, 'Alan','Port',5/5/1955,'937-614-6144',0 0,0),
(4,'Bill','Johnson',4/5/1940,'513-555-9333',0,0,0)
(5,'Andrew','Jackson',1/5/1950,'513-555-4561',0,0,0 )
 
One set of values per INSERT statement.
 
A VALUES clause will only insert a single record, and you can't have multiple like that. If you can get the values from a table you can use a SELECT clause to insert multiple records:

INSERT INTO...
SELECT...
FROM...

If not, you'll have to run your insert once for every record.
 
So, you are saying you can't append more than one row at a time?
 

Users who are viewing this thread

Back
Top Bottom