I'm trying to use this SQLCMD to schedule an export of my data to my harddrive for FTP transfer.
sqlcmd -S 192.168.10.4 -i c:\ftp\sqlscripttest.sql -o c:\ftp\sqloutputdata.csv
I'm currently trying to have this SQLCMD "name" the file correctly.
I need the FILENAME to be this: sqloutput02102008.csv
I need the DATE to be based on GETDATE() from SQL server...in this format:
replace(convert(varchar(10), getdate(),101), '/', '')
Can you help me undestand HOW to add this logic to my SQLCMD so that the FILENAME that is created will have the correct DATE in it..?