This is the first query I run. It appends any records from my import table
that do not match the tracking table (* Base) joined on the tracking number.
INSERT INTO [07517 m_eggers Base] ( Status, BTN, PON, [Reference TN],
[Submitted Date], [Business Name], [Service Order #], [Due Date], [Completion
Date], [Tracking #], [ASR Notes], [SORD Remarks], [Assignment Section],
Product )
SELECT [qry SalesLog Import fixed].Status, [qry SalesLog Import fixed].[BTN
Fixed], [qry SalesLog Import fixed].[PON Fixed], [qry SalesLog Import
fixed].[RTN Fixed], [qry SalesLog Import fixed].SDate, [qry SalesLog Import
fixed].[Business Name], [qry SalesLog Import fixed].[Service Order Fixed],
[qry SalesLog Import fixed].[Due Date Fixed], [qry SalesLog Import
fixed].[Completion Date], [qry SalesLog Import fixed].[Tracking # Fixed],
[qry SalesLog Import fixed].[ASR Notes], [qry SalesLog Import fixed].[SORD
Remarks], [qry SalesLog Import fixed].[Assignment Section], [qry SalesLog
Import fixed].[Product Fixed]
FROM [qry SalesLog Import fixed] LEFT JOIN [07517 m_eggers Base] ON [qry
SalesLog Import fixed].[Tracking # Fixed] = [07517 m_eggers Base].[Tracking #]
WHERE ((([07517 m_eggers Base].[Tracking #]) Is Null));
This is the second query I run to look for any asr notes that are different
between the base and import tables.
UPDATE [qry SalesLog Import fixed] INNER JOIN [07517 m_eggers Base] ON [qry
SalesLog Import fixed].[Tracking # Fixed] = [07517 m_eggers Base].[Tracking
#] SET [07517 m_eggers Base].[ASR Notes] = [qry SalesLog Import fixed]![ASR
Notes]
WHERE ((([07517 m_eggers Base].[ASR Notes])<>[qry SalesLog Import
fixed]![ASR Notes] Or ([07517 m_eggers Base].[ASR Notes]) Is Null) AND (([qry
SalesLog Import fixed].[ASR Notes]) Is Not Null));
I run this query to put the BTN into the base table if the import table has
a BTN in the field.
UPDATE [qry SalesLog Import fixed] INNER JOIN [07517 m_eggers Base] ON [qry
SalesLog Import fixed].[Tracking # Fixed] = [07517 m_eggers Base].[Tracking
#] SET [07517 m_eggers Base].BTN = [qry SalesLog Import fixed]![BTN Fixed]
WHERE ((([07517 m_eggers Base].BTN) Is Null) AND (([qry SalesLog Import
fixed].[BTN Fixed]) Is Not Null));
What is in here that would update some of the other fields in my base table
with information from by import table?
Jerry Whittle said:
Post the SQL here.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
:
I have been downloading data from a website that I import into a table. From
there I run queries on the data to append and update my tracking table for
the data I download from the internet. After running an update query for
just one field in the table (joined to the downloaded data) I have noticed
that other fields are being updated. I checked the SQL View and cannot
diagnose how the query is updating other fields. I did change the Dynaset in
some queries but how could that change fields not even chosen in the design
view or the SQL view? I have a feeling it has to do with the Dynaset
settings. Any ideas would be greatly appreciated. Thanks.