I have 2 tables, inwhich I need to update one with the information from the other.
My first table contains information regarding the pricing of parts, 133,000 parts to be exact. This table has information regarding the: Cost, Dealer Net and List Price.
My 2nd table of specific parts开发者_开发百科 that need to have the Old Cost, Old Dealer Net, and Old List price pulled from Table 1.
I am wondering how I go about importing my table that needs to be updated, and running an update query to get the information from the other table?
I can provide anything you may need to assist or clarify my question
In MS SQL the query would look like this:
update t2
set OldCost = t1.Cost, OldDealerNet = t1.DealerNet, OldListPrice = t1.ListPrice
from table2 t2 inner join table1 as t1
on t2.fkPartId = t1.Id
Colin, what are you using to store your data? Excel, Access, SQL Server or something else? Also, are you trying to combine results from both data sets?
Now that you have imported both tables into Access you can just go to queries and add both tables. Then you need to find a common field on both tables to join on almost like a common denominator. Then you can just click the columns you need to see then execute the query to get the results you need.
If you get Type Mismatch in Expression, it is basically saying you cannot compare a text field to an integer field. What you could do it try to modify the table to make sure the field data types match.
If I am reading your post right I don't think you need to do an UPDATE statement. I think you can either export these query results to EXCEL or just use the MAKE TABLE option and get your results that way...
精彩评论