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 |
|
pazzy11
Posting Yak Master
145 Posts |
Posted - 2008-02-14 : 09:42:19
|
| If I have a table with one column and i want to insert a few 100's rows of namesI can't use the INSERT stmt as that does one row at a time , how can i achieve this ? |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-14 : 09:51:18
|
| What is the source for these name values? Are they contained in CSV or Excel file?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
pazzy11
Posting Yak Master
145 Posts |
Posted - 2008-02-14 : 09:54:38
|
| TEXT, i am trying [CODE]INSERT into tablevalues ( 'djskjk','dhsjdhsj','dksjkd',..)[/CODE]this wont work, however i could put them into a CSV or excel file ..is this easier and if so what do i do ?DTS ? |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-14 : 09:57:06
|
| You can use either BCP or Bulk Insert, but frankly I don't think 100 rows are worth this exercise.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2008-02-14 : 10:23:48
|
| insert into tableselect 'djskjk' as nameunion all select 'dhsjdhsj'union all select 'dksjkd'union all ....Jayto here knows when |
 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-02-14 : 11:44:16
|
| BULK INSERT MyTable FROM 'c:\myfile.txt' WITH ( FIELDTERMINATOR = '\t', ROWTERMINATOR = '\n' )Jack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
|
|
|
|