Update Query Issue erasing current data (1 Viewer)

Marbinski

Registered User.
Local time
Today, 05:41
Joined
Aug 24, 2004
Messages
45
Scenario: I currently have 2 tables, Table_X and Table_X_Import. Both tables are identical in structure. I receive my data from Table_X_Import from an Excel spreadsheet. Anyways, Data in Table_X has established data in all fields. When I import data into Table_X_Import, I only have some fields populated but not all such as the primary and a certain column to update. My problem is whenever I use an update query to update Table_X with Table_X_Import Data, the null field data from X_Import gets transferred to Table X and erases data that is already in the table.

Any suggestions???

I'm thinkin something to with If Not Null, but not sure how do do it.

Thanks in advance!
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:41
Joined
Feb 19, 2002
Messages
43,430
Are you saying that the only columns with data in the spreadsheet are the key and the ones that were changed? If so, I see lots of coding in your future. You'll need to process the spreadsheet in a code loop and update only the fields that were changed.
 

Users who are viewing this thread

Top Bottom