473,386 Members | 1,810 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,386 software developers and data experts.

Append Table problem

Hi all,

I am having a problem appending data to an existing table. I have two
tables with identical fields and I want to append the data from one
table (T2) to the first (T1). T1 has 136 records and T2 has 209, for
a difference of 73 records. When I run the append query, only 72
records are selected from T2, and there doesn't seem to be a pattern
as to why the records selected were selected. They aren't the last 72
records or the first. Can anyone tell me what I am doing wrong or if
they have had this happen before.

Thanks,

Wade
Nov 30 '07 #1
7 1840
wa*******@gmail.com wrote:
Hi all,

I am having a problem appending data to an existing table. I have two
tables with identical fields and I want to append the data from one
table (T2) to the first (T1). T1 has 136 records and T2 has 209, for
a difference of 73 records. When I run the append query, only 72
records are selected from T2, and there doesn't seem to be a pattern
as to why the records selected were selected. They aren't the last 72
records or the first. Can anyone tell me what I am doing wrong or if
they have had this happen before.

Thanks,

Wade
Is it possible you have an index that does not allow duplicates?
Nov 30 '07 #2
On Nov 30, 12:08 pm, Salad <o...@vinegar.comwrote:
wade.w...@gmail.com wrote:
Hi all,
I am having a problem appending data to an existing table. I have two
tables with identical fields and I want to append the data from one
table (T2) to the first (T1). T1 has 136 records and T2 has 209, for
a difference of 73 records. When I run the append query, only 72
records are selected from T2, and there doesn't seem to be a pattern
as to why the records selected were selected. They aren't the last 72
records or the first. Can anyone tell me what I am doing wrong or if
they have had this happen before.
Thanks,
Wade

Is it possible you have an index that does not allow duplicates?
I had several fields indexed, with duplicates being okay. I removed
the indexing and still having problems. Returned the same 72
records.
Nov 30 '07 #3
wa*******@gmail.com wrote:
On Nov 30, 12:08 pm, Salad <o...@vinegar.comwrote:
>>wade.w...@gmail.com wrote:
>>>Hi all,
>>>I am having a problem appending data to an existing table. I have two
tables with identical fields and I want to append the data from one
table (T2) to the first (T1). T1 has 136 records and T2 has 209, for
a difference of 73 records. When I run the append query, only 72
records are selected from T2, and there doesn't seem to be a pattern
as to why the records selected were selected. They aren't the last 72
records or the first. Can anyone tell me what I am doing wrong or if
they have had this happen before.
>>>Thanks,
>>>Wade

Is it possible you have an index that does not allow duplicates?


I had several fields indexed, with duplicates being okay. I removed
the indexing and still having problems. Returned the same 72
records.
Is the query a "query" or are you creating the query in code? If
possible, open up your query in the query builder. Set it to a Select
criteria. I would think you have a filter on there someplace.

Perhaps post your SQL statement here, maybe someone can spot a problem.
Right now its simply guessing and by goshing.
Nov 30 '07 #4
<wa*******@gmail.comwrote in message
news:7f**********************************@o6g2000h sd.googlegroups.com...
On Nov 30, 12:08 pm, Salad <o...@vinegar.comwrote:
>wade.w...@gmail.com wrote:
Hi all,
I am having a problem appending data to an existing table. I have two
tables with identical fields and I want to append the data from one
table (T2) to the first (T1). T1 has 136 records and T2 has 209, for
a difference of 73 records. When I run the append query, only 72
records are selected from T2, and there doesn't seem to be a pattern
as to why the records selected were selected. They aren't the last 72
records or the first. Can anyone tell me what I am doing wrong or if
they have had this happen before.
Thanks,
Wade

Is it possible you have an index that does not allow duplicates?

I had several fields indexed, with duplicates being okay. I removed
the indexing and still having problems. Returned the same 72
records.
Access usually provides a message when some records are not appended. Do you
possibly have SetWarnings set to False, or do you have query confirmations
turned off? The Access message is somewhat cryptic but it can give a
hint....
Fred Zuckerman
Nov 30 '07 #5
On Nov 30, 12:26 pm, Salad <o...@vinegar.comwrote:
wade.w...@gmail.com wrote:
On Nov 30, 12:08 pm, Salad <o...@vinegar.comwrote:
>wade.w...@gmail.com wrote:
>>Hi all,
>>I am having a problem appending data to an existing table. I have two
tables with identical fields and I want to append the data from one
table (T2) to the first (T1). T1 has 136 records and T2 has 209, for
a difference of 73 records. When I run the append query, only 72
records are selected from T2, and there doesn't seem to be a pattern
as to why the records selected were selected. They aren't the last 72
records or the first. Can anyone tell me what I am doing wrong or if
they have had this happen before.
>>Thanks,
>>Wade
>Is it possible you have an index that does not allow duplicates?
I had several fields indexed, with duplicates being okay. I removed
the indexing and still having problems. Returned the same 72
records.

Is the query a "query" or are you creating the query in code? If
possible, open up your query in the query builder. Set it to a Select
criteria. I would think you have a filter on there someplace.

Perhaps post your SQL statement here, maybe someone can spot a problem.
Right now its simply guessing and by goshing.
First of all, thanks for the help.

I am building my query in design view. Each table T1 and T2, has an
autonumber field. I tried selecting the field sans the autonumber
from T2 to append to T1.

The SQL code is here:

INSERT INTO CollN1 ( Collection_Num, Old_Num, Species, Col_Date,
Location )
SELECT CollN2.Collection_Num, CollN2.Old_Num, CollN2.Species,
CollN2.Col_Date, CollN2.Location
FROM CollN1 INNER JOIN CollN2 ON CollN1.ID = CollN2.ID;

I am not an SQL expert, but the problem seems to be the inner join on
the ID field. Both tables have an autonumber field, and the query is
selecting those records from T2 where T1.ID=T2.ID. Should I get rid
of the autonumber column, or is there a way around that.

thanks,
Wade
Nov 30 '07 #6
wa*******@gmail.com wrote:
On Nov 30, 12:26 pm, Salad <o...@vinegar.comwrote:
>>wade.w...@gmail.com wrote:
>>>On Nov 30, 12:08 pm, Salad <o...@vinegar.comwrote:
>>>>wade.w...@gmail.com wrote:
>>>>>Hi all,
>>>>>I am having a problem appending data to an existing table. I have two
>tables with identical fields and I want to append the data from one
>table (T2) to the first (T1). T1 has 136 records and T2 has 209, for
>a difference of 73 records. When I run the append query, only 72
>records are selected from T2, and there doesn't seem to be a pattern
>as to why the records selected were selected. They aren't the last 72
>records or the first. Can anyone tell me what I am doing wrong or if
>they have had this happen before.
>>>>>Thanks,
>>>>>Wade
>>>>Is it possible you have an index that does not allow duplicates?
>>>I had several fields indexed, with duplicates being okay. I removed
the indexing and still having problems. Returned the same 72
records.

Is the query a "query" or are you creating the query in code? If
possible, open up your query in the query builder. Set it to a Select
criteria. I would think you have a filter on there someplace.

Perhaps post your SQL statement here, maybe someone can spot a problem.
Right now its simply guessing and by goshing.


First of all, thanks for the help.

I am building my query in design view. Each table T1 and T2, has an
autonumber field. I tried selecting the field sans the autonumber
from T2 to append to T1.

The SQL code is here:

INSERT INTO CollN1 ( Collection_Num, Old_Num, Species, Col_Date,
Location )
SELECT CollN2.Collection_Num, CollN2.Old_Num, CollN2.Species,
CollN2.Col_Date, CollN2.Location
FROM CollN1 INNER JOIN CollN2 ON CollN1.ID = CollN2.ID;

I am not an SQL expert, but the problem seems to be the inner join on
the ID field. Both tables have an autonumber field, and the query is
selecting those records from T2 where T1.ID=T2.ID. Should I get rid
of the autonumber column, or is there a way around that.

thanks,
Wade
Yes. You have a "link line" between T1 and T2. Dbl-Click on it. Take
Option3, All records in T2 and matching in T1. Then drag T1's
autonumber into a column, turn ShowOff to false, and in the criteria enter
Is Null

Now it will select all records in T2 that have no records in T1.
Nov 30 '07 #7
On Nov 30, 12:53 pm, Salad <o...@vinegar.comwrote:
wade.w...@gmail.com wrote:
On Nov 30, 12:26 pm, Salad <o...@vinegar.comwrote:
>wade.w...@gmail.com wrote:
>>On Nov 30, 12:08 pm, Salad <o...@vinegar.comwrote:
>>>wade.w...@gmail.com wrote:
>>>>Hi all,
>>>>I am having a problem appending data to an existing table. I have two
tables with identical fields and I want to append the data from one
table (T2) to the first (T1). T1 has 136 records and T2 has 209, for
a difference of 73 records. When I run the append query, only 72
records are selected from T2, and there doesn't seem to be a pattern
as to why the records selected were selected. They aren't the last 72
records or the first. Can anyone tell me what I am doing wrong or if
they have had this happen before.
>>>>Thanks,
>>>>Wade
>>>Is it possible you have an index that does not allow duplicates?
>>I had several fields indexed, with duplicates being okay. I removed
the indexing and still having problems. Returned the same 72
records.
>Is the query a "query" or are you creating the query in code? If
possible, open up your query in the query builder. Set it to a Select
criteria. I would think you have a filter on there someplace.
>Perhaps post your SQL statement here, maybe someone can spot a problem.
Right now its simply guessing and by goshing.
First of all, thanks for the help.
I am building my query in design view. Each table T1 and T2, has an
autonumber field. I tried selecting the field sans the autonumber
from T2 to append to T1.
The SQL code is here:
INSERT INTO CollN1 ( Collection_Num, Old_Num, Species, Col_Date,
Location )
SELECT CollN2.Collection_Num, CollN2.Old_Num, CollN2.Species,
CollN2.Col_Date, CollN2.Location
FROM CollN1 INNER JOIN CollN2 ON CollN1.ID = CollN2.ID;
I am not an SQL expert, but the problem seems to be the inner join on
the ID field. Both tables have an autonumber field, and the query is
selecting those records from T2 where T1.ID=T2.ID. Should I get rid
of the autonumber column, or is there a way around that.
thanks,
Wade

Yes. You have a "link line" between T1 and T2. Dbl-Click on it. Take
Option3, All records in T2 and matching in T1. Then drag T1's
autonumber into a column, turn ShowOff to false, and in the criteria enter
Is Null

Now it will select all records in T2 that have no records in T1.
Thanks a lot. That helped me out.

Wade
Nov 30 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: anita | last post by:
I am sorry if this sounds as a silly problem. I have table 1 with 10 records and table 2 with 20 records. I want to append 20 records from Table 2 to table 1. But when I run the append query, the...
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...
2
by: Mark | last post by:
I have a FE/BD 2002 DB on a XP pro platform. I know this is ugly but it works for me...... A text file is produced from our Oracle WMS. (Average 20k records) A command button deletes all records...
5
by: Michael C via AccessMonster.com | last post by:
Hello, I have a table that I am appending 3 seperate tables into. My main problem is that each time I append the data, it simply adds to the data already there. That might sound ok, except that...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
2
by: sj | last post by:
Situation: I have 2 tables, parent table (Invoice) and child table (InvoiceDetails) that is link by InvID in the child. Requirement: Need to do one-time append of information to another table...
8
by: DongningLi | last post by:
At month end, there will be a month-to-date table that should be appended into the Year-to-date one. The MTD table is a lump-sum one, no way to enter into the YTD one entry by one entry. I can...
4
by: dougmeece | last post by:
Morning Everyone... I have a table that needs to be append to and also updated. All the fields in the table are populated with data from the text boxes and combo boxes on a form. The Date...
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.