Append query Access not working as expected

344 Views Asked by At

I have 2 tables, both equal. For the example let's call them Table A and Table B. Table B is an exact copy of Table A - but without the data.

Table A holds engineering data and a DATE field. I have written some code that does some calculations etc. and after those calculations, it should APPEND the data from Table A to Table B so as to keep a historical reference to the data.

Now, I can append from Table A to Table B with the following Query:

INSERT INTO [Table B] SELECT [Table A].* FROM [Table A]

This works once. The second time I run it (whith another date in Table A) Table B is not updated. Why? What am I missing here?

Probably something silly.. But I can't seem to figure it.

Of course I can do a loop in code and fill it record for record.. but that's slow.

*tables have autonumber key fields and duplicates are allowed on all other fields.

1

There are 1 best solutions below

0
On

nvr mind..

"INSERT INTO [Table B] SELECT * FROM [Table A]"

works.

Still strange though that the original query works once.. but ok. Solved