I am using the below code to create a .CSV file using a BCP commmand.
What I need to know is how do I make the first row in the CSV file the column names? IS there some option on the BCP command to do this
or will it be more difficult?
declare @sql varchar(8000)
SET @sql = 'bcp Appliance.AppAppliances.AudioVideo out c:\av.csv -c -t, -T -S' + @@servername
exec master..xp_cmdshell @sql
What I need to know is how do I make the first row in the CSV file the column names? IS there some option on the BCP command to do this
or will it be more difficult?
declare @sql varchar(8000)
SET @sql = 'bcp Appliance.AppAppliances.AudioVideo out c:\av.csv -c -t, -T -S' + @@servername
exec master..xp_cmdshell @sql