Click here to Skip to main content
14,447,269 members
Rate this:
Please Sign up or sign in to vote.
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 3:33am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You can try using " >> " instead of " | " piping.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100