Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Bcp export with columns name

$
0
0

Hi,
I'm using BCP utility to export data from MS sql server 2012.
I need to have on top of the data file the names of only the columns that I export.

I know that I can export the names of the columns with bcp but I should do a query (in a bat file) containing the name of the columns that I want export.

So I think that the best solution is to first create a header file with the names of the columns that i export and then do a merge with the data file exported.
Is this a good solution?you Know other solutions?

Thanks in advance anyone who wants to give me some advice.
BR


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>