Can't make the most simplest of Queries...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm pretty new to access and this seems like it would be the simplest of
queries but I can't get it to work.

I imported some info from Excel into a table with 3 columns:
ID, Name, Description.

I have an empty table all set up with these fields and one extra field for
Notes.
The ID field is the key'd autonumber field.

For the life of me, I can't get a query to just copy all the records from
the imported table to my existing one. I've tried Append, Update, and even
just a select query but they all come up empty. I know I'm probably just
missing some small detail but I'm pulling my hair out because I can't get
something so basic to work.

Can someone post an example sql query on how to do this?

Thanks!
 
I should have mentioned that I've only been using the Query Design Window and
not looking at the SQL code... Man, Borland Paradox seemed so much easier
than Access and that was over 10 years ago.

Thanks again.
 
INSERT INTO YourNewTable (ID, Name, Description)
SELECT ID, Name, Description
FROM YourImportedTable;

You should check your imported table to see if the ID field is text or
number. If it is text, you may need to change your select statement to be
SELECT CLng(ID), Name, Description
 
I finally got it to work!
For some reason, the problem was that I also put the table I was appending
"To" into the design field... even without any links.
When I deleted that table from the Design view, it worked!

Thanks for the help.
 
Back
Top