Insert Multiple Records into a Table

Can I insert multiple records into a table using "INSERT INTO"., it seems it 
can insert only one record at one time.

INSERT INTO Table1 (F1, F2, F3, F4) VALUES ( 'CCP', 0.0115, 0.008202, 120) 

Is there an alternate way to insert multiple records in MS Access Table 
using a query.

Please help. Thanks.
0
Utf
4/13/2010 6:53:02 PM
access.queries 6343 articles. 1 followers. Follow

3 Replies
3094 Views

Similar Articles

[PageSpeed] 33

mario wrote:
>Can I insert multiple records into a table using "INSERT INTO"., it seems it 
>can insert only one record at one time.
>
>INSERT INTO Table1 (F1, F2, F3, F4) VALUES ( 'CCP', 0.0115, 0.008202, 120) 
>
>Is there an alternate way to insert multiple records in MS Access Table 
>using a query.
>
>Please help. Thanks.

It depends.  Where's the data?  Is it in a table or some kind of attachable
format? (delimited text file,  Excel file...etc)?

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201004/1

0
PieterLinden
4/13/2010 7:00:03 PM
The table I want to update is in MS Access and I'm trying to insert multiple 
records into a table using a querry so I'm looking to write a querry like 

INSERT INTO Table1 (F1, F2, F3, F4) VALUES ( 'CCP', 0.0115, 0.008202, 120), 
( 'WCCP', 0.0125, 0.018202, 140)

Thanks



"PieterLinden via AccessMonster.com" wrote:

> mario wrote:
> >Can I insert multiple records into a table using "INSERT INTO"., it seems it 
> >can insert only one record at one time.
> >
> >INSERT INTO Table1 (F1, F2, F3, F4) VALUES ( 'CCP', 0.0115, 0.008202, 120) 
> >
> >Is there an alternate way to insert multiple records in MS Access Table 
> >using a query.
> >
> >Please help. Thanks.
> 
> It depends.  Where's the data?  Is it in a table or some kind of attachable
> format? (delimited text file,  Excel file...etc)?
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201004/1
> 
> .
> 
0
Utf
4/13/2010 8:09:01 PM
mario wrote:
>The table I want to update is in MS Access and I'm trying to insert multiple 
>records into a table using a querry so I'm looking to write a querry like 
>
>INSERT INTO Table1 (F1, F2, F3, F4) VALUES ( 'CCP', 0.0115, 0.008202, 120), 
>( 'WCCP', 0.0125, 0.018202, 140)
>
>Thanks

As far as I know, Access doesn't support that syntax.  SQL Server 2008 does,
so  you might be able to create pass through queries to do it, if you're
writing to SQL Server...

If you're just entering data through a form in Access, you don't need *any*
queries at all to do this.  Just bind the form to the table and open the form
in data entry mode.  You won't see existing entries, but it's the most
efficient way of doing what you want.

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201004/1

0
PieterLinden
4/13/2010 8:41:26 PM
Reply:

Similar Artilces:

Sending email to multiple recepients from Groupwise
I am currently using SendObject to generate an email in Groupwise and it works fine. I am now trying to add multiple recepients in the To and CC sections but am running into difficulty. Here is the code: DoCmd.SendObject acSendNoObject, , , Forms!frm_appraisal_emp_info_entry! AssignedPC, "Training", "Compliance", _ strSubject, strMsg, True From what I have read I need to use semi colons to separate additional recepients: DoCmd.SendObject acSendNoObject, , , Forms!frm_appraisal_emp_info_entry! AssignedPC; "Deputy Chief"; "AA_Deputy Chief, "Trainin...

repost; Automatically updating formulae in multiple sheets
I list sales of 20+ products each week for the year A2-A23 are the products and B-BA are the colums for each week I have multiple sheets that have the same sales results in the same format foreach previous year 2004;2003;2002;2001;2000 Each week I want to compare total sales in the year to date i.e weeks 1-20 with weeks 1-20 in each previous year. so next week it will be 1-21. I have on each sheet a cumulative total for each of the 20 products in the year to date i.e Cell A25=SUMB2:BA2 and Cell A26=SUMB3:BA3 and so on for each product. This means each week I have to alter the formula in C...

multiple combination bars chart
possible to have the above mentioned?.. for example I have 4 shops.... each shop has a Total Sales figure and Total Cash Sales Figure... Y axis would be the number.... X axis would be the month... Jan, Feb Mar....Dec... so for each month there would be 4 vertical bars showing Total Sale figure for each of the 4 shops (represented by 4 different colours) Now the diff part is whether for the Cash Sales Figure... is i possible to integrate into each of the 4 bars represented by another different colours??.. Desired outcomes: 4 bars each month with different colours... -- blurboibo ------...

Pivot Table missing lines
Hi Folks! I have a pivot table derived for a worksheet of about 250 lines. When I add additional rows to the work sheet, sort it, and sav it followed by refreshing my pivot table, I'm missing the last two item in this pivot table. I can repeat this every time. When I creat another identical pivot table for the same updated worksheet, my las to items are in this new pivot table. Always the last two items! Any suggestions. I thank you in advance for your feedback. Best Regards, Slewrat -- Slewrat ----------------------------------------------------------------------- Slewrate's ...

Pivot Table design problem.
Hi, I have a problem designing a Pivot Table. Example : I rent appartments. Many tenants rent many appartments in many cities. I would like my Pivot Table to show if there are any tendancies for, say, those who rent in Paris to also rent in Tokyo. But I can't get my layout set up right to show this. Here is the data in CSV : TenantID; Appart#; City; Toto; 500; Paris; Toto; 123; Paris; Toto; 1000; Tokyo; .... Jojo; 147; Acapulco; Jojo; 157; Nice; Jojo; ...

Pivot Table refresh #3
Data has been removed from the worksheet that feeds the Pivot Table. After Refesh the deleted field name still appears in the drop down list. How can the field name be removed? Unless you want to write a macro, delete the pivot table and create a new one. -- Regards, Tom Ogilvy "neeses" <neeses@discussions.microsoft.com> wrote in message news:C931DD0D-DDA6-4DA5-B5B8-72AF328BC8AD@microsoft.com... > Data has been removed from the worksheet that feeds the Pivot Table. After > Refesh the deleted field name still appears in the drop down list. How can > the field n...

Count records from form where txtbox="ABC"
Hi everyone, I would like to have the total count of records from my form where in Field1, the value is "ABC" for exemple -- Thanks, Sorry if my english isn''t correct, but I''m from Potugal ;) Emanuel Violante Galeano On Mon, 28 Jan 2008 07:54:02 -0800, Emanuel Violante wrote: > Hi everyone, > > I would like to have the total count of records from my form where in > Field1, the value is "ABC" for exemple Add an unbound text control to the form. Set it's control source to: =Abs(Sum([Field1]='ABC'")) -- Fred Please res...

pictures in table cells
I am using publisher 2003. I created a table in publisher that I want to add pictures to. I need to be able to insert more rows into the table and I want the pictures to move down with the rows. Is there any way to link a picture with a cell or table row? With your cursor in the cell, fill, fill effects, picture tab... you may have to check the aspect. If you add rows the picture will stay in the cell where you inserted it. -- Mary Sauer http://msauer.mvps.org/ "Dan" <Dan@discussions.microsoft.com> wrote in message news:5A099BA8-9FFD-46BC-ACE7-0732679F4C54@microsoft...

Select Multiple Objects to Delete?
Does anyone know if it is possible to select multiple objects (pictures, text boxes, arrows, etc.) at once to delete them? Hi Lloyd Just hold down the shift key as you click on the items Good Luck Mark Graesse mark_graesser@yahoo.co Boston M ----- Lloyd Adams wrote: ---- Does anyone know if it is possible to select multiple objects (pictures, text boxes, arrows, etc.) at once to delete them To kill all in one go - Edit / Go To / Special / Objects - Hit the Delete button. -- Regards Ken....................... Microsoft MVP - Excel ...

One user managing multiple Exchange accounts
Hello I have created a user AAA@mydomain.com and a user BBB@mydomain.com on my AD (W2000 Server, Exchange 2000 Server). I have affected full access rights to AAA on BBB Exchange mailbox, and I have authorised AAA to send mails in name of BBB When I connect AAA on a PC, and open Outlook XP (linked to AAA Exchange account), I add to AAA account the BBB account, and then I can correctly see and read BBB's mails. But when I want to answer in name of BBB, Outlook tells me that I am not authorized to send mails in name of BBB. What did I forget PG You mentioned that you have authorized AAA t...

Pasting to Multiple Selections.
Is there any way you can copy from a contiguous range and paste it to multiple cells or range that are non contiguous i.e. multiple columns of a different worksheet? Further can you tell excel not to copy data to hidden columns? On Sat 01/07/06 10:11:01, JayQue <JayQue@discussions.microsoft.com> wrote: > Is there any way you can copy from a contiguous range and paste it to > multiple cells or range that are non contiguous i.e. multiple columns of a > different worksheet? Further can you tell excel not to copy data to hidden > columns? I do not think you can copy to non...

IM-importing gl entry multiple times
When I import a gl entry from Excel, it brings in the entire entry multiple times. It seems that if there are 25 gl accounts used, it brings it in 25 times. I can't find any reason why it does this. Any ideas? Thanks! Tracey D Are you getting 25 entries with one account in each entry? If so, let me lay out the steps you need to verify. 1. You need to have a header query and a detail query. 2. The header query, assuming it's from the same file as the detail query, should be grouped based on a common field. If you view the header query, you should see only one record for e...

View records option
Hi Everyone, I have a patient database. My main form is based on my patients table. A subform on my main form has Pt. location which has the fields Area, Room number and bed number. How can I set something up so they can search for a patient by room number? I don't want to use any code. I need some ideas/options for this. Thanks, Linda SHUUUUT UUUUP! I liked the last suggestion and then tried it. That is the coolest thing ever. You guys are really great! Thank-you, Linda "Trever B" <TreverB@discussions.microsoft.com> wrote in message news:DD22722D-...

Mainform & subform with same record
Hi - I have a mainform with a subform. Mainform & subform access the same record. I.E it is not a one to many. Subform holds a nested tab control displaying fierld from the same record as ther mainform. Mainform is iopened with a docmd openform with either acFormEdit or acFormAdd. I have tried to sync the two forms setting the subform recordset to the mainform recordset which works when displaying but when I try to enter or change data in the subform I get the error "Update or CancelUpdate without AddNew or Edit" Any idea what I am doing wrong. Thanks Allen On Fri, 20...

Changing the field names of linked table
I have an ODBC link to some live data. Unfortunately the field names for this data are just codes and aren't very helpful. Though I have made a table in access which links the codes to the actual description. I need a way to create a new table which has all the data from the ODBC link but for the field names it uses the field description rather than the field code. Can someone help? Sanchez wrote: > I have an ODBC link to some live data. > > Unfortunately the field names for this data are just codes and aren't > very helpful. > > Though I have made a table in...

Help on Multiple Downloads
Is it possible to download multiple files using URLDownloadToFileW(); ??? im trying out with this code..what im getting is im able to download multiple files with single filename this is in EVC++ 4.0 MFC APP hr = ::URLDownloadToFileW(NULL,_T("http://www.erivasystems.com/demo/Tender.enc"), dPath,0,NULL); but when i try to do some string manipulations to get different filenames its not working..no files are downloaded.but im not getting any messages either // hr = ::URLDownloadToFileW(NULL,tstr,dPath,0,NULL); what could be the problem?? void ondownload() { FILE* file = ...

Pivot Table Help 12-17-09
Hello, Thanks for the help with this Pivot Table Question. In the "Drop Row Field Here" section I am dropping the salespeople’s name. In the "Drop Data Item Here" I am dropping October Sales. I know to change the table to sum in order to get the total for each salesperson. Here is my question: When I go to drop November sales I cannot figure out how to change the data from "count" to "sum" and keep October as a "Sum" as well. Can you help? Thanks Jim In excel 2003 by right clicking on the field name or its data in...

Basic question on MX record setting
Imagine on my internal network, I have two Symantec SMTP appliances named "symantec01" and "symantec02", with IP addresses 10.0.0.1 and 10.0.0.2 respectively (internal netwokr). Then I need to create MX records on my external DNS servers to allow SMTP traffic to reach those appliances. On my external DNS servers, I understand I need to create Host records and MX records. Let's say I create a host record named "mymail01.mycompany.com", IP=172.10.0.1" (please note I am pointing to a routable external IP address, not my internal IP address). and &qu...

Query multiple records
Table/Fields Students/ Student ID, First name, last name.... Tests/ Student ID, Test Name, Test Score, Test Date. I need to be able to find students based on their record of tests. For example I need to find each student who got above a certain score on 3 or more tests consecutively and within a certain time period. In one to many relationships I have no idea how to find the one by querying the many related to it. I am new to access and any help would be appreciated greatly. Chaos EggHeadCafe - .NET Developer Portal of Choice http://www.eggheadcafe.com Doesn't matter. Create a q...

how to enter a word table into a thread on the internet
I am trying to enter a word table into a forum thread but everything I copy and paste it makes a big mess of the numbers and the columns aren't there. It's possible that the forum only accepts the plain text format. -- Stefan Blom Microsoft Word MVP "happydaycaremomma" <happydaycaremomma@discussions.microsoft.com> wrote in message news:E54A7235-6DB0-43D5-B9D1-9E2395533CD1@microsoft.com... >I am trying to enter a word table into a forum thread but everything I copy > and paste it makes a big mess of the numbers and the columns aren't ther...

Need help with excel table and summaries
I have a table I am using to get the total hours worked for a half month period for employees. I need to have the information for each employee go to a individual summary for that employee and I need to update it for each new half month work period. Pay Period November 16-30, 2006 Day Thu Fri Sat Sun Date Empl Name Joe S. Fred. M. Sarah J. Mike L. The above is a sample of how the table is laid out. I've made a summary for each employee with the following: Employee Name November 16-31, 2006 Joe S. (formula is =A6) Total hours worked 0 (formula is =SUM...

How to keep the cell borders of the pivot table?
Is there any way to not lose border formatting after refreshing a Pivot Table? Thank you. On Aug 8, 2:26=A0am, "=C1=F7=C0=CB=B5=C4=CB=AB=D3=E3" <rover...@hotmail.com= > wrote: > Is there any way to not lose border formatting after refreshing a Pivot > Table? > Thank you. Make sure you have selected "Preserve Formatting" in the table options Yes. I am sure I have selected "Preserve Formatting" in the table options "David Heaton" <dheaton@stanleyworks.com.au> ??????:3c91c9ce-2759-4d28-a7c9-053433508082@u20g2000prg.googlegroups...

Drop tables in SQL 2008 Management Studio
How can I drop the tables in SQL 2008 Management Studio? I do not want to delete the database, but drop the tables so that I can import new data. Thanks in advance. John Open new query in SSMS and issue DROP TABLE tblname Make sure that the table does not have FK (Foreign Key) to reference or being referenced by another table "John" <John@discussions.microsoft.com> wrote in message news:5A2EFAC4-737D-4A21-A0F6-313F3F943AB3@microsoft.com... > How can I drop the tables in SQL 2008 Management Studio? I do not want to > delete the database, but d...

creating a delete query that is accessing 2 tables
I am unable to figure out how to tell the query which table I want to delete the records from. Could you post the SQL of the query that is not working? And tell us which table you want the records to be deleted from? DELETE FROM TableA WHERE TableA.SomeField in (SELECT BField FROM TableB WHERE Fieldz = 22) Another method that may work DELETE DistinctRow TableA.* FROM TableA INNER JOIN TableB ON TableA.XX = TableB.XX WHERE TableB.Fieldz = 22 -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County .. ...

Can I make multiple excel workbooks populate information to one main wrkbk real time?
To give you an idea of what I am trying to accomplish... I run a mortgage company and I have about 16 loan officers I personally manage. Currently each of them keep their own excel pipeline of loans in progress in their personal folder on the server, of which I have to go into each one to check on. I can design the new pipelines however here is my main goal. I'd like to create one large read only (to them) pipeline with all the loan officers names in it, along with the appropriate info to the loan. I would like to create personal pipelines for each of them to input their data into. I ...