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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Field names and exporting with BCP

Author  Topic 

Gbergna
Starting Member

2 Posts

Posted - 2005-09-29 : 09:57:31
Hi.

I´m a new SQL user, and I´m trying to export SQL tables to TXT tables with the BCP function. It works perfect, but I can´t bring the field names to the TXT files. I don´t see any parameter that could do that for me. Can anyone give a hint about how to do it?

The command I am using now is:

EXEC master..xp_cmdshell 'bcp "SELECT * FROM ema.dbo.RFMACUMALT" queryout "c:\tablas data mining\rfmACUMALT.txt" -S HP-ML350 -T -n -c'
go

Thanks

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-29 : 10:02:36
See if this helps you
http://weblogs.sqlteam.com/brettk/archive/2005/04/13/4395.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Gbergna
Starting Member

2 Posts

Posted - 2005-09-29 : 14:02:04
Thanks a lot! I´ll see if I can make it work...
Go to Top of Page
   

- Advertisement -