HOW CAN I DO THIS?

S

Santi

I’m want to be able to update and include new information in a Master table
using a secondary table that will be fed on a monthly basis by new or
existing information. Want I want is for the master table to update records,
take in new information and erase any old information. For example:

If the Master_table has item#: 12345 with a unit price of $ 90.00 (regular
price) and Item# 12345 with a price of 80.00 for buying 10cs and if the
NYS_table has the same Item# 12345 but with a price of 105.00 (regular
price), Item# 12345 $ 100.00 for buying 5cs and Item# 12345 $95.00 for buying
10cs then I want the master table to be updated with this information by
replacing the original data.

Below is the current query I’m using


UPDATE Master
RIGHT JOIN NYS
ON Master.[Item#] =NYS.[ Item]
SET Master.[DESCRIPTION] = NYS.[Description],
Master.[UNIT PRICE] = NYS.[PRICE],
Master.[COMMENTS] = NYS.[Disc $]
 
K

KARL DEWEY

You did not pose a question.

Maybe try this --
UPDATE Master INNER JOIN NYS ON Master.[Item#] =NYS.[Item#]
SET Master.[DESCRIPTION] = NYS.[Description],
Master.[UNIT PRICE] = NYS.[PRICE],
Master.[COMMENTS] = NYS.[Disc $];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top