If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > SQL INSERT Statement in Access

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-20-04, 22:23
doff135 doff135 is offline
Registered User
 
Join Date: Apr 2004
Posts: 2
SQL INSERT Statement in Access

I'm trying to add multiple records into an Access. I can get one record to add using the INSERT function, but I'm trying to add multiple records without using another table. Any help out there? For example this would be a possible input string. All fields have data in the values:

INSERT INTO Employees VALUES ('456342345', 'Cobb, Frank', '452 2nd ST, Newtown, AR 12456', '1235432359', 'h123@jcom.net', '5678', '100299', '35100')/
INSERT INTO Employees VALUES ('457456789', 'Sands, Jeff', '545 10th ST, Newtown, AR 12456', '1235423456', 'g123@jcom.net', '5678', '110299', '35200')/
Reply With Quote
  #2 (permalink)  
Old 04-20-04, 22:41
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
Not sure if this will work but replace your /'s with a ; that might work...

In sql you can put go between the lines and that will work....

Other then that the only way I know of would be by executing multiple insert statments
Reply With Quote
  #3 (permalink)  
Old 04-20-04, 22:47
doff135 doff135 is offline
Registered User
 
Join Date: Apr 2004
Posts: 2
INSERT function in Access with multiple records

I tried that, if you place the ; after the first record you get an SQL error that there are characters after the ;
Reply With Quote
  #4 (permalink)  
Old 04-21-04, 10:04
ASP-Hosting.ca ASP-Hosting.ca is offline
Registered User
 
Join Date: Apr 2004
Posts: 50
Just run a loop and execute 1 sql statement on each step of the loop.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On