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 |
|
christosds
Starting Member
10 Posts |
Posted - 2011-02-17 : 08:25:14
|
| Hello, i have 2 tablesTable 1 MATERIALCODE, NAME, BARCODEand Table 2 CCBARCODE, BARCODETable 1 contains items without barcode numbers, table 2 contains the items barcode numbers.I want to insert in table 1 the items barcodes from the table 2 when the MATERIAL.CODE=CCBAR.CODEHow do i do this?Also is it possible to import the table 2 data directly from an excel file in to table 1?Thanks in advance. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-02-17 : 08:46:08
|
[code]UPDATE mSET BARCODE = c.BARCODEFROM MATERIAL m INNER JOIN CCBAR c ON m.CODE = c.CODE[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|