New Records based on Status

rocky09

Registered User.
Local time
Today, 07:40
Joined
Nov 21, 2012
Messages
51
I have Two Tables.

1. ELR Table ( ProductID, ProductName, Date of Expire) - Updates every day.
2. StoreData (ProductID, ProductName,Date of Manufacturing,DateofExpires,TotalProducts and Status)

My Requirement is to get the New data from ELR Table to to StoreData.

Example:

ProductA is already existing in StoreData and status is closed. So, tomorrow, if productA comes in ELR Table, ProductA from ELR table should copied into Storedata.

Is it possible?
 
Can you demonstrate your issue with actual data? Show two sets of data: before and after. Also be sure to include enough samples to cover all cases--e.g. what if ProductA isn't in StoreData.
 
Can you demonstrate your issue with actual data? Show two sets of data: before and after. Also be sure to include enough samples to cover all cases--e.g. what if ProductA isn't in StoreData.

Hi Thank you very much for your reply.

Sorry, the data is a bit sensitive. I will try to get some dummy data.

If productA is not in Storedata, it has to copied from ELR table.
 
Then that would require a simple append query (http://www.w3schools.com/sql/sql_insert.asp) that uses a LEFT JOIN (http://www.w3schools.com/sql/sql_join_left.asp) to see if the record is in StoreData.

First make a select query to find out which records are not in StoreData but in ELR.
In query design, bring in both your tables, link them via the appropriate fields and then, from StoreData, bring those joined fields down to the bottom area and show every field from ELR. In their criteria section under the StoreData fields put in "Is Null". Finally you create the LEFT JOIN by right clicking the joining lines between the tables and selecting the option that shows all from ELR. Run it and you have the data you want.

From there you turn that SELECT query into an APPEND query using the ribbon.
 
Then that would require a simple append query (http://www.w3schools.com/sql/sql_insert.asp) that uses a LEFT JOIN (http://www.w3schools.com/sql/sql_join_left.asp) to see if the record is in StoreData.

First make a select query to find out which records are not in StoreData but in ELR.
In query design, bring in both your tables, link them via the appropriate fields and then, from StoreData, bring those joined fields down to the bottom area and show every field from ELR. In their criteria section under the StoreData fields put in "Is Null". Finally you create the LEFT JOIN by right clicking the joining lines between the tables and selecting the option that shows all from ELR. Run it and you have the data you want.

From there you turn that SELECT query into an APPEND query using the ribbon.

Sorry for the late reply.

Thank you so much much. I will try and update you.
 

Users who are viewing this thread

Back
Top Bottom