Basically I am trying to combine certain fields from two tables into one using an append query. The trick comes in that I want to only include records that have changed since the query was last run. When I first run my query, I get the results expected to populate the desired table (Unit_Bid_test).
I must not be nesting my WHERE Clause correctly, because I can pass updates from my Unit_Pricing table just fine, but updates made to my Eligible_Bidders table are unseccessful. Here is the base query:
I have added criteria to the WHERE clause in an attempt to limit the appending of the table to new records:
This seems to work for updates made to the Unit_Pricing table, but not updates made to the Eligible_Bidders table.
Any idea how to nest the WHERE statement to correct this issue?
I must not be nesting my WHERE Clause correctly, because I can pass updates from my Unit_Pricing table just fine, but updates made to my Eligible_Bidders table are unseccessful. Here is the base query:
Code:
INSERT INTO Unit_Bid_test ( Bid_Tab_ID, Unit_Price_ID )
SELECT Eligible_Bidders.Bid_Tab_ID, Unit_Pricing.Unit_Price_ID
FROM Eligible_Bidders, Unit_Pricing
WHERE (((Unit_Pricing.Project_ID)=[Eligible_Bidders].[Project_ID])) OR (((Eligible_Bidders.Project_ID)=[Unit_Pricing].[Project_ID]));
I have added criteria to the WHERE clause in an attempt to limit the appending of the table to new records:
Code:
INSERT INTO Unit_Bid_test ( Bid_Tab_ID, Unit_Price_ID )
SELECT Eligible_Bidders.Bid_Tab_ID, Unit_Pricing.Unit_Price_ID
FROM Eligible_Bidders, Unit_Pricing
WHERE (((Eligible_Bidders.Bid_Tab_ID) Not In (select Bid_Tab_ID from Eligible_Bidders)) AND ((Unit_Pricing.Project_ID)=[Eligible_Bidders].[Project_ID])) OR (((Unit_Pricing.Unit_Price_ID) Not In (select Unit_Price_ID from Unit_Bid_test)) AND ((Eligible_Bidders.Project_ID)=[Unit_Pricing].[Project_ID]));
This seems to work for updates made to the Unit_Pricing table, but not updates made to the Eligible_Bidders table.
Any idea how to nest the WHERE statement to correct this issue?