473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Append query

This is a pretty simple question I believe. I am just running into a small problem.

I imported two Excel sheets into Access. They have the same fields and field types and I simply want to combine them into one. Actually just attach the second one to the bottom of the first one. I imagine it's a simple append query to get the job done, but for some reason every time I try it runs for a couple minutes and then says "Ran out of disk space." What do I do?
Jul 15 '08 #1
5 1044
nspader
78
Please provide the method in which you are running it right now. It is possible it is in an endless loop. If you can provide the code youa re using, then we can all possibly help you further.

Thanks

Nick
Jul 15 '08 #2
INSERT INTO 1HSearchResults
SELECT [2HSearchResults].*
FROM 1HSearchResults, 2HSearchResults;
Jul 15 '08 #3
INSERT INTO 1HSearchResults
SELECT [2HSearchResults].*
FROM 1HSearchResults, 2HSearchResults;
If I try:

INSERT INTO 1HSearchResults
SELECT [2HSearchResults].*
FROM 2HSearchResults;

Then it throws a different error.

"Microsoft Access can't append all the records in the append query. It didn't add 49,576 record(s) to the table due to key violations. Do you want to add them anyway?"

I am trying to append around 51,000 records.
Jul 15 '08 #4
FishVal
2,653 Expert 2GB
If I try:

INSERT INTO 1HSearchResults
SELECT [2HSearchResults].*
FROM 2HSearchResults;

Then it throws a different error.

"Microsoft Access can't append all the records in the append query. It didn't add 49,576 record(s) to the table due to key violations. Do you want to add them anyway?"

I am trying to append around 51,000 records.
Hello.

Expand|Select|Wrap|Line Numbers
  1. INSERT INTO 1HSearchResults
  2. SELECT [2HSearchResults].*
  3. FROM 1HSearchResults, 2HSearchResults;
  4.  
The query above will try to insert cartesian product of both tables - no wonder this could exhaust resources.

The second query looks correct. The reason for the error is that you try to insert records containing values that are breaking table rules (unique indexes, constraints etc.). If you want to add all records, then you should change table rules. If not, then just do nothing - Access will add all valid data omitting the rest.

Regards,
Fish
Jul 15 '08 #5
I figured it out. Had to remove the primary key by deleting the ID columns. Worked like a charm after that.
Jul 15 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John | last post by:
Hi - I am trying to perform a simple append query, with no luck. I have a table (MktPrices) that has the following fields: BondID, PriceDate, Price. The objective is to allow the user to input a...
2
by: Danny | last post by:
I want to extract a subset of fields from one table into another the master table has many fields the subset has about half, but still many. Is there a way I can just append the master into the...
1
by: Aaron | last post by:
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; ...
3
by: Larry Rekow | last post by:
As part of a macro, I'm trying to automate appending a table with new records. let's say the table 2 has some new records in it, but also has a lot of identical records to table 1. I would...
1
by: David Barger | last post by:
Greetings, It appears that an Append Query I run in Access XP is randomly failing to append a field. I have payroll data being entered into a payroll database. This data is exported daily to...
4
by: robboll | last post by:
When I try to use an append query from an oracle link it takes forever. I am exploring the idea of doing an append action using a pass-through query. If I have an Oracle ODBC connection to...
4
by: MN | last post by:
I have to import a tab-delimited text file daily into Access through a macro. All of the data needs to be added to an existing table. Some of the data already exists but may be updated by the...
4
by: pmacdiddie | last post by:
I have an append query that needs to run every time a line item is added to a subform. The append writes to a table that is the source for a pull down box. Problem is that it takes 5 seconds to...
10
by: pythonnoob | last post by:
Hello everyone. New to python as well as this forum, but i must say ive learned a but already reading through some posts. Seems to be a pretty helpful community here. Before i post a question...
4
by: Scott12345 | last post by:
Hi, here is my situation, I have a DB that tracks machine downtime (30 machines) per day. Several users will update this through the day. I created an append query that creates 30 dummy values and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.