• Pradeep, Does this help you?

    declare @cmd varchar(2000)

    declare @Name varchar(100)

    declare @reterror int

    Set @Name = 'Pradeep.vbs'

    set @cmd =

    'bcp "Select ''First Line Here'' Union All '

    + 'Select ''Second Line Here'' Union All '

    + 'Select ''ABC'' Union All '

    + 'Select ''123'''

    +' " queryout C:\' + @name +' -b5000 -c -t"" -T'

    print @cmd

    --Select len(@cmd)

    --execute @RETERROR = master..xp_cmdshell @cmd

    If @RETERROR <> 0

    Begin

    --You know the rest here

    Select getdate()

    End

    Don't forget to uncomment the Execute.