lookforsmt
Registered User.
- Local time
- Today, 11:52
- Joined
- Dec 26, 2011
- Messages
- 672
Hi!
I am trying to do basic update query. But have challenge when i run the 2 update query to update the same field from another table it overrides the existing data, so if the field not matching it removes the data and leaves it blank.
I am trying to explain as below:
I have three tables with the fields
tbl_Master:
RefAC
SOLId
Location
tbl_SOL:
SOLId
Location
tbl_VIP:
RefAC
SOLID
Location
1) Update Query:
Updates field "Location" in tbl_Master from tbl_SOL "Location" Join Properties "SOLId"
Result: Matching SOLID gets updated in tbl_Master.location
2) Update Query:
Updates field "Location" in tbl_Master from tbl_VIP "Location" Join Properties "RefAC"
Result: It overides the exiting location in tbl_Master and updates matching VIP.Location. (This is the issue)
New Result: Update tbl_Master.Location only where the field is matching and leave the existing data as is.
Any help in update query
I am trying to do basic update query. But have challenge when i run the 2 update query to update the same field from another table it overrides the existing data, so if the field not matching it removes the data and leaves it blank.
I am trying to explain as below:
I have three tables with the fields
tbl_Master:
RefAC
SOLId
Location
tbl_SOL:
SOLId
Location
tbl_VIP:
RefAC
SOLID
Location
1) Update Query:
Updates field "Location" in tbl_Master from tbl_SOL "Location" Join Properties "SOLId"
Result: Matching SOLID gets updated in tbl_Master.location
2) Update Query:
Updates field "Location" in tbl_Master from tbl_VIP "Location" Join Properties "RefAC"
Result: It overides the exiting location in tbl_Master and updates matching VIP.Location. (This is the issue)
New Result: Update tbl_Master.Location only where the field is matching and leave the existing data as is.
Any help in update query