View Full Version : How to join two tables and replace values in specific columns?


dejanc
03-08-2010, 12:13 PM
Hello all,

I need help. I have add attachment Sample.mdb.

I need to join two tables, Shipment_details.shipment_number, and shipment.account.
But I want to replace JUST value "819161" in Shipment.account with accounts from Shipment_details.account?????

I have just start learned SQL. It is not difficult to understand, but sometimes I just can not found solution/statement to get result. I know practice, practice, and again practise is the best way.

Please help, and thank you everyone for help in advance...

MStef
03-08-2010, 10:39 PM
Here it is, (attachment, zip).
Look at "Query1UPD", run query.
Before make a copy of tbl shipment.
I think it is what you need.

dejanc
03-08-2010, 10:50 PM
Not exactly. This is just update for entire column. I would like to replace only values "819161" in Shipper_account From Shipment table with values from Account field from Shipment_details table...

dejanc
03-08-2010, 11:01 PM
Maybe, how to update just a specific value in column (my case 819161) with values from another table?

dejanc
03-08-2010, 11:12 PM
Found it...I have just add "819161" value in criteria field for update query....

MStef
03-09-2010, 01:28 AM
Repetitio est mater studiorum.