Broadcast Radio Forums

Audiowall cart listing - automated report


http://forums.broadcastradio.com/Topic8705.aspx

By showbizshane - Monday, November 7, 2016 12:52:38 PM

Is there anyway I can run a weekly automated report for all the carts on our audiowall or the SQL command to query the autotrack DB to export to a excel/txt file to give all cart numbers artist title info, either way would work.  This would benefit our presenters when creating their playlists when working from home when having access to their OneDrive's.

I know I can do this manually in Autotrack but wanted this to be automated and current as new tracks are added on a weekly basis.


Many thanks
Shane

By showbizshane - Monday, March 6, 2017 8:27:32 PM

Got it running in Task Manager to export to CSV for all Myriad songs in the AutoTrack Database on a weekly basis.  I'm not a good at scripting but it does the job.  This uses Powershell with Invoke-SQLDCMD

Remove-Item "H:\Myriad.csv"
(Deletes the previous file)
Start-Sleep -m 10000
(Waits 10 seconds)
$DBServer = "localhost\your instance name"
$database = "Your Database name"
$DBScriptFile = "As provided in this post.sql"
$OutputFile = "H:\Myriad.csv"
Invoke-Sqlcmd -InputFile $DBScriptFile -Serverinstance $DBServer -Database "$database" | Export-Csv -Path $OutputFile -NoTypeInformation


This script is then scheduled in Task Manager.