-- Alcatel section
DECLARE @AlcatelFileName VARCHAR(255)
SET @AlcatelFileName = 'C:\Vanrise\Bad_CDRs\Alcatel\AlcatelBadCDR_' + @YesterdayDate + '(Top 100).csv'
DECLARE @AlcatelCmd NVARCHAR(4000)
SET @AlcatelCmd = 'bcp "SELECT top(100) * FROM [MediationSTGCDR].[Mediation_ICX].[AlcatelBadCDR] WHERE [FileName] LIKE ''%' + @YesterdayDate + '%''" queryout "' + @AlcatelFileName + '" -c -t, -S 10.21.3.3 -T'
-- Execute the bcp command for Alcatel
EXEC xp_cmdshell @AlcatelCmd
I want to show the column header in the CSV file that we are creating. Is there any hero here to solve this?