help !

  • Thread starter Thread starter fi.or.jp.de
  • Start date Start date
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.
 
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
 
Brilliant, Thanks a lot
Hey, can you guide where can I get good access tutor links online
 
Back
Top