help !

F

fi.or.jp.de

Hi All,

I have two tables
table 1 - contains 10 to 15 fields
table 2 - contains 2 fields


table 1 has field "Names"
table 2 have filed "Names" & "xpid"


I need to update table 1 with "xpid" in place of "Names"


How should i go for this ?


Thanks in advance.
 
M

Marshall Barton

fi.or.jp.de said:
I have two tables
table 1 - contains 10 to 15 fields
table 2 - contains 2 fields

table 1 has field "Names"
table 2 have filed "Names" & "xpid"

I need to update table 1 with "xpid" in place of "Names"


First run an update query to set table1's xpid field:

UPDATE table1 INNER JOIN table2
ON table1.Names = table2.Names
SET table1.xpid = table2.xpid

Then run another query to remove table2's Names field:

ALTER TABLE table1 DROP COLUMN Names
 
F

fi.or.jp.de

Brilliant, Thanks a lot
Hey, can you guide where can I get good access tutor links online
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top