I'm importing updated data from a .csv/.txt file into my database and then running an update query to bring data up-to-date. The data gets updated correctly only if there is no change in the order of the data in the source .csv/.txt file. I want to update the data by relevant data matching, not by position.
UPDATE tblPositionSymbol INNER JOIN (tblShrtName INNER JOIN (Newposition INNER JOIN
tblPosition ON Newposition.ID = tblPosition.PositionID) ON tblShrtName.ID =
tblPosition.tblShrtName_ID) ON tblPositionSymbol.ID = tblPosition.tblPositionSymbol_ID
SET tblPosition.quantity = [newposition].[quantity], tblPosition.cost = [newposition].[cost],
tblPosition.[$gain/loss] = [newposition].[$gain/loss], tblPosition.[mkt value] =
[newposition].[mkt value], tblPositionSymbol.[as of date] = [newposition].[as of date];
I'm also attaching a jpg that shows the relationships.
I need criteria to find the matching data between the [NewPosition].[symbol] and [tblPositionSymbol].[symbo
Thanks in advance for any help or suggestions