Update Query to matched Values

Ice Rhino

Registered User.
Local time
Today, 10:01
Joined
Jun 30, 2000
Messages
210
I have two tables

Table One
property_name
property_code

Table Two
property_name
property_code
....and various other fields

Table One contains information such as

property_name property_code
marble arch ma

Table Two contains
property_name
marble arch

but no value for the property_code

I want to create a simple 'Update' query that will populate the value of property_code in Table Two where the value of property_name between the two tables is equal.

I need this to be a permanent update as a pose to a 'on the fly' lookup.

I know this is really basic stuff, but I have a real mental block when it comes to update queries.

Kindest Regards
 
Try:

UPDATE [Table One] INNER JOIN [Table Two] ON [Table One].property_name=[Table Two].property_name
SET [Table Two].property_code=[Table One].property_code;
 
Many Thanks, all sorted

Regards
 

Users who are viewing this thread

Back
Top Bottom