View Full Version : append action query


madrav72
12-01-2001, 09:28 AM
hi this is prob fairly simple

i had this prob before and fixed it but i seemed to have forgotten how. basically the expected no of appended records should be 2 buts trying to append 6 in other words there is repetition.

all im tring to do is to append data from one table which contains a id, an amount and date into another table with same structure but slightly different names.

access generates the code for this query as follows...

INSERT INTO [DATA STORAGE] ( [CHQ NO], AMOUNT, TRANSCODE, [DATE INSERTED] )
SELECT test.chequeno, test.amount, test.transcode, test.date
FROM test, [DATA STORAGE]
ORDER BY test.chequeno;


please give me any suggestions!!
cheers!!

Jack Cowley
12-01-2001, 09:37 AM
Sounds like you need to add Criteria to your query so it only appends selected records.

Pat Hartman
12-01-2001, 06:21 PM
You have two table names in your From clause and no join is specified. Therefore, Access will produce a cartesian product which is the number of rows in table1 times the number of rows in table2.

For your purposes, you don not need [DATA STORAGE] in the From clause and that is causing the problem. Remove it.

madrav72
12-02-2001, 03:53 AM
hi guys just to let you know pats solution worked great. hopefully i wont make the same miastake again!

cheers

rav