Hi i have query working file to export to .txt file , i just want to add header , any help would be much appriciated , the column name is much appriciated
declare @sql varchar(8000)
select @sql = 'bcp "select top 50 * from [Alltrigger].[dbo].[customlook]" queryout \live-ftp\sftp_upload\allfile\saad_test.txt -c -t^| -T -S' + @@servername
exec master..xp_cmdshell @sql
--- header file
exec master..xp_cmdshell 'BCP "select
'provided column name' " queryout \prod-ftp\sftp_upload\allstate\header.csv -c T -t'
Please reply , i have tried to make header file seprate but its not working