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 |
|
goligol
Posting Yak Master
128 Posts |
Posted - 2011-10-13 : 16:18:54
|
| I have a table with one column, want to add a new column and map some information to this column from another table:I dont know how to create this query:select a.hs_code ,'' a.hs_code_desc -------this is the new column in table a update aset a.hs_code_desc = b.hs_code_desc from transportation.dev.hsWithoutNaics ainner join trade.dev.export_concord2 bon a.hs_code = b.hs_code |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-14 : 01:33:54
|
it should beALTER TABLE transportation.dev.hsWithoutNaics ADD hs_code_desc varchar(100) NULL I've assumed datatype as varchar. make sure you use correct datatype instead------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|