Append Query appending thousands of rows (1 Viewer)

RossD

New member
Local time
Tomorrow, 01:57
Joined
Nov 21, 2016
Messages
6
Hi,

I'm new to Access (i.e. have limited knowledge and experience).

I have an append query in place which has worked previously, but seems to 'have lost its way'.

The table I'm appending from has 71 records.

When I run the query, the message reads: " You are about to append 21868 row(s)".

I'm not sure why it's not just appending just the 71 records as before.

Any ideas?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:57
Joined
Feb 28, 2001
Messages
26,999
Post the query. From your description, we have insufficient information.

Wouldn't hurt to know at least a little of the table structure including whether you have any oddities like mapping an Excel file as though it were an external table. Thinks like that.
 

JHB

Have been here a while
Local time
Today, 15:57
Joined
Jun 17, 2012
Messages
7,732
Show the SQL-string for the query.
One reason could be if you've included another table/query in the append query.
 

RossD

New member
Local time
Tomorrow, 01:57
Joined
Nov 21, 2016
Messages
6
INSERT INTO [Session Record] ( Reference, PPSStatus, AddSession, AccountNumber, Customer, EmailAddress1, Emailaddress2, StudentNumber, StudentName, StudentCal, TutorNumber, TutorName, Email, TutorCal, [Day], StartTime, FinishTime, Location, ClosedRemarks, OpenRemarks, UnitAmount, TutorRate, SCFlink )
SELECT WeeklyTimetable.Reference, WeeklyTimetable.PPSStatus, WeeklyTimetable.AddSession, WeeklyTimetable.AccountNumber, WeeklyTimetable.Customer, WeeklyTimetable.EmailAddress1, WeeklyTimetable.Emailaddress2, WeeklyTimetable.StudentNumber, WeeklyTimetable.StudentName, WeeklyTimetable.StudentCal, WeeklyTimetable.TutorNumber, WeeklyTimetable.TutorName, WeeklyTimetable.Email, WeeklyTimetable.TutorCal, WeeklyTimetable.Day, WeeklyTimetable.StartTime, WeeklyTimetable.FinishTime, WeeklyTimetable.Location, WeeklyTimetable.ClosedRemarks, WeeklyTimetable.OpenRemarks, WeeklyTimetable.UnitAmount, WeeklyTimetable.TutorRate, WeeklyTimetable.SCFlink
FROM WeeklyTimetable, [Session Record];
 

RossD

New member
Local time
Tomorrow, 01:57
Joined
Nov 21, 2016
Messages
6
Hi The_Doc_Man,

I don't think I'm mapping an excel file.

Table 1 (where I'm appending from) has 23 fields

Table 2 (Where I'm appending to) has 42 fields (23 of which it has in common with table 1)

Both tables have a relationship with Tables A, B and C where they have one field in common.
 

JHB

Have been here a while
Local time
Today, 15:57
Joined
Jun 17, 2012
Messages
7,732
Take away the second table [Session Record], (it is located in the "FROM WeeklyTimetable, [Session Record];").
 

RossD

New member
Local time
Tomorrow, 01:57
Joined
Nov 21, 2016
Messages
6
JHB,

Thank you VERY much - that has worked a treat.

I've check previous versions of my DB and the "[Session Record]" was not in the SQL-string; not sure how or why it appeared :/

Thanks again.
 

Users who are viewing this thread

Top Bottom