Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
keuler
Starting Member
10 Posts |
Posted - 2008-06-13 : 18:19:02
|
| All- Supposing I have table_a and table_b. Table_a has fields FIRST_A and LAST_A for people's first and last names. Similarly, table_b has FIRST_B and LAST_B for people's first and last names.How would I create a record in table_b for each record in table_a, such that for each added record, the values of FIRST_A is copied to FIRST_B and LAST_A is copied to LAST_B. (Table_b will have other fields that are left unfilled.)Thanks!-Kurt |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-14 : 00:34:56
|
| UPDATE tbSET tb.FIRST_B=ta.FIRST_A,tb.LAST_B=ta.LAST_AFROM table_a taINNER JOIN table_b tbON tb.LinkingCol=ta.LinkingCollinkingcol are columns by which the two tables are related. |
 |
|
|
|
|
|