johnmerlino
Registered User.
- Local time
- Today, 09:44
- Joined
- Oct 14, 2010
- Messages
- 81
Hey all, I would like to update one column with the value of another column from another table:
table_1
names_1 addresses
BLAIR,SHERON S 6110 Browen Road
BROWN,BRENON I H/E BROWN,WANDA R 1100 Lake Road
RODRIGUEZ,LILLIAN M 3332 Brick Road
GLAUBMAN,ALAN & SHORSTEIN,LILLIAN 3332 Brick Road
table_2
names
BLAIR,SHERON S
BROWN,WANDA R
RODRIGUEZ,LILLIAN M
GLAUBMAN,ALAN
Notice how table_1 contains the same names as table 2 but table 2 also has additional content that's not needed. So basically where the names are like each other, I would like to assign table 1 content into table 2.
So I would like it to look like this:
table_2
BLAIR,SHERON S 6110 Browen Road
BROWN,WANDA R 1100 Lake Road
RODRIGUEZ,LILLIAN M 3332 Brick Road
GLAUBMAN,ALAN 3332 Brick Road
You think something like this would do it?
UPDATE table_1
SET table_1.names_1 = table_2.names
WHERE (((InStr([table_1].[names_1],[table_2].[names]))>0));
;
Note that no two fields are exaclty alike so I don't think I can do inner join here.
Thanks for response
table_1
names_1 addresses
BLAIR,SHERON S 6110 Browen Road
BROWN,BRENON I H/E BROWN,WANDA R 1100 Lake Road
RODRIGUEZ,LILLIAN M 3332 Brick Road
GLAUBMAN,ALAN & SHORSTEIN,LILLIAN 3332 Brick Road
table_2
names
BLAIR,SHERON S
BROWN,WANDA R
RODRIGUEZ,LILLIAN M
GLAUBMAN,ALAN
Notice how table_1 contains the same names as table 2 but table 2 also has additional content that's not needed. So basically where the names are like each other, I would like to assign table 1 content into table 2.
So I would like it to look like this:
table_2
BLAIR,SHERON S 6110 Browen Road
BROWN,WANDA R 1100 Lake Road
RODRIGUEZ,LILLIAN M 3332 Brick Road
GLAUBMAN,ALAN 3332 Brick Road
You think something like this would do it?
UPDATE table_1
SET table_1.names_1 = table_2.names
WHERE (((InStr([table_1].[names_1],[table_2].[names]))>0));
;
Note that no two fields are exaclty alike so I don't think I can do inner join here.
Thanks for response