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)
 bcp using header name

Author  Topic 

askcomputer
Starting Member

12 Posts

Posted - 2006-05-29 : 03:24:23
Hi

In a text file data I want column name(i.e. header) what should option or method I used.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-29 : 04:21:44
Select "column1", column2", etc
Union all
Select column1, column2,etc

Note that you need to cast columns to varchar if they are not

Also read this
http://weblogs.sqlteam.com/brettk/archive/2005/04/13/4395.aspx

Madhivanan

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

- Advertisement -