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 |
|
ramdas
Posting Yak Master
181 Posts |
Posted - 2004-04-20 : 17:13:50
|
| Hi,I want to export data in around 40 tables using bcp. The database is on sql server 2000. When i bcp each table i want the first to have column Names. Is this doable using bcp? Or should I using the datapump task 40 times to export the data to a text file. One of the key requirement is that the first row in the text file should have column names.Thank youRamdasRamdas NarayananSQL Server DBA |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-04-20 : 17:31:57
|
| bcp does not have the option of putting the first row with column names. You could possibly put them in yourself using the INFORMATION_SCHEMA view called COLUMNS and a UNION to your table. I would go down the DTS route.Tara |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2004-04-20 : 18:16:48
|
| If you put the field names as the first row in your select statement, that should do it as well (using BCP).Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
|
|
|