Click here to Skip to main content
15,946,179 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Guys,
Can you please help me how could I generate a log file with time and date which will not overwrite the existing result's of the output.

Here is my .bat file code:

sqlcmd -S BernsDBServer -d BernsTable -i "\\BernsRemoteServer\d$\Tools\DeleteNullValues.sql" -s " | " -o "\\BernsRemoteServer\d$\Tools\log.txt"

the above code is already working but it overwrites the first result.

Any help would be appreciated. Thank You.

What I have tried:

sqlcmd -S BernsDBServer -d BernsTable -i "\\BernsRemoteServer\d$\Tools\DeleteNullValues.sql" -s " | " -o "\\BernsRemoteServer\d$\Tools\log.txt"
Posted
Updated 19-Jan-20 2:33am

1 solution

You can try using " >> " instead of " | " piping.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900