hi all,
created a job and with TSQL script
EXEC xp_cmdshell 'bcp "exec sp_who2" queryout "C:\job results\abc.csv" -T -c'
the job execution was successful and am getting the required data but the data was overwritten on the same file.
I required the next execution and output to different file every time for each execution. in simple words, required a new file every time with outputs.
thanks and regards,
SQLLover