11-20-2016, 09:12 PM
|
#1
|
Newly Registered User
Join Date: Nov 2016
Posts: 6
Thanks: 5
Thanked 0 Times in 0 Posts
|
Append Query appending thousands of rows
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?
|
|
|
11-20-2016, 09:48 PM
|
#2
|
Happy Retired Curmudgeon
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 12,902
Thanks: 65
Thanked 1,304 Times in 1,201 Posts
|
Re: Append Query appending thousands of rows
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.
__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
|
|
|
The Following User Says Thank You to The_Doc_Man For This Useful Post:
|
|
11-20-2016, 09:49 PM
|
#3
|
Have been here a while
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,550
Thanks: 2
Thanked 2,023 Times in 1,979 Posts
|
Re: Append Query appending thousands of rows
Show the SQL-string for the query.
One reason could be if you've included another table/query in the append query.
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
|
|
|
The Following User Says Thank You to JHB For This Useful Post:
|
|
11-21-2016, 03:05 AM
|
#4
|
Newly Registered User
Join Date: Nov 2016
Posts: 6
Thanks: 5
Thanked 0 Times in 0 Posts
|
Re: Append Query appending thousands of rows
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];
|
|
|
11-21-2016, 03:10 AM
|
#5
|
Newly Registered User
Join Date: Nov 2016
Posts: 6
Thanks: 5
Thanked 0 Times in 0 Posts
|
Re: Append Query appending thousands of rows
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.
|
|
|
11-21-2016, 03:26 AM
|
#6
|
Have been here a while
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,550
Thanks: 2
Thanked 2,023 Times in 1,979 Posts
|
Re: Append Query appending thousands of rows
Take away the second table [Session Record], (it is located in the "FROM WeeklyTimetable, [Session Record];").
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
|
|
|
The Following User Says Thank You to JHB For This Useful Post:
|
|
11-21-2016, 02:42 PM
|
#7
|
Newly Registered User
Join Date: Nov 2016
Posts: 6
Thanks: 5
Thanked 0 Times in 0 Posts
|
Re: Append Query appending thousands of rows
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.
|
|
|
Thread Tools |
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
All times are GMT -8. The time now is 03:51 AM.
|
|