By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 1,978 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

Trying to update one table with another table using update query, Help please

P: 14
Im having trouble with updating my 1 table with the information from another!

I have a table with 6 fields.

Code(pk), Name, Title, Address, State, city, zip

the table is called Info.

Now i have a excel file which i imported it in the access db as a table called newinfo

the new info has only 5 of the fields.

Name, Title, Address, State, city and zip

Im trying to update the "Info" table with the information from the "NewInfo" table using an update query but im having no luck at all.

any help or advice on how my sql statement should look like or anything would help alot.
Oct 16 '07 #1
Share this Question
Share on Google+
4 Replies

Expert 2.5K+
P: 2,653
Hi, slavisa.

What type is [code] table field?
Oct 16 '07 #2

P: 14
the field is a text field
Oct 16 '07 #3

Expert 2.5K+
P: 2,653
the field is a text field
The field is PK. You need to give it value unique for each record. Update query will fail unless a unique value for [code] field is being generated dynamically, for example via VBA function.
What is supposed to be in [code] field?
Oct 16 '07 #4

P: 14
thanks for that little info, in my excel sheet i had to place the Code and have it as pk, this way it knows which row to replace. I've tested it today and it worked.

Oct 16 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.