I have a batch script which extract SQL data to CSV file:
bcp Database.dbo.MyTable out C:\Reports\Output.csv -s ServerName -T -c
I need the name of the output file to contain the current date.
For example the output file has to be of the following format:
I guess the DATE function has to be used here as an argument.
How I can do that?