Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Question

$
0
0
invoke-sqlcmd -query "select * from table1" | export-csv -path "C:\Server\TEST.csv" -Delimiter ";" -append -notype I'd like to run the above powershell query through a job which runs every 1 hour and basing on the datetime column of table1, all new records need to be appended to ones which were previously inserted into the csv file.How do I write the query?Thanks!

Viewing all articles
Browse latest Browse all 6525

Trending Articles