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 |
|
frank2
Starting Member
35 Posts |
Posted - 2005-11-11 : 14:28:27
|
| I have a table MyTable which contains no records.. Primarykey – int (identity). CoName – varcharI have a second table CoNames which contains 500 records. Code – varvhar. CompanyName – varcharThe 500 records in CoNames there are 100 unique names. How do I copy only the unique names from CoNames table into the empty MyTable table?Thanks |
|
|
coolerbob
Aged Yak Warrior
841 Posts |
Posted - 2005-11-11 : 15:01:06
|
| insert into mytable (coname)select distinct companynamefrom conameor something like that, i've done it a million times. u should hav been able to find the answer to that question on this site without having to wait for an answer from any of us |
 |
|
|
frank2
Starting Member
35 Posts |
Posted - 2005-11-11 : 15:07:42
|
| That did it. thank you |
 |
|
|
coolerbob
Aged Yak Warrior
841 Posts |
Posted - 2005-11-11 : 15:12:19
|
| no worriesif you wanna learn some cool stuff, check this outhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210 |
 |
|
|
|
|
|