Apend Query Not working - Invalid Arguement?

Walshie

Registered User.
Local time
Today, 23:10
Joined
Nov 25, 2011
Messages
34
Hi,

Really confused with this one and wondered if anyone could see where i'm going wrong.

I have two tables tblHistory and tblTemp both table have the column "07/04/2012" set as number type

All I am trying to do is append the data from tblTemp into tblHistory using the following command

INSERT INTO tblHistory ([07/04/2012])
SELECT [07/04/2012] FROM tblTemp;

But I keep getting "Error 3001 - Invalid Arguement" has anyone got any ideas? All of the fields in each table have the same data types if this helps

Cheers
Chris
 
I've found out this error is being caused as my database is swelling to over 2gb (from 3mb) Can anyone tell me why this is and how I can just simply import the above column?

Cheers
Chris
 
First, with a field named "07/04/2012" your database tables are most likely not normalized. Field names shouldn't contain specific data themselves (i.e. the date, someone's proper name, a zip code). How many columns of data do you have named in this fashion in tblHistory?

That is a problem, but not might be the problem for this issue. Most likely, since you are using a temporary table, this might be causing your file to become inadvertantly larger than it needs to be. I would compact and repair your database and see if that helps.
 
Thanks for the reply, I have 52 fields named in this way. This is due to report I import, it is set out as below:

Part Number | 07/04/2012 | 31/03/2012 | 24/03/2012 etc..
12345 | 2 | 5 | 3

I can easily rename these fields if you think this is the issue?

Other than that would you be able to let me know if the SQL is correct to import the info from tblTemp to tblHist?

Thanks again
Chris
 
As plog has said these [07/04/2012] type strings are not meaningful field/column names.

They may be values of fields, and perhaps should/could be recorded in a table for use.
Field names should NOT contain spaces or special characters.

I think you may want to read up on Tables and fields and data types before proceeding.

It may also be helpful if you described what exactly you are trying to do in plain English, and get some advice/opinions, before getting too involved in Reports and SQL.

There are excellent Access resources at http://www.accessmvp.com/strive4peace/
 

Users who are viewing this thread

Back
Top Bottom