Hi all,
I'm using sqlcmd via cmd.exe to run a SQL Script on a SQL Server Instance as Alteryx appears unable to do this natively.
If I open cmd on my machine and enter the command manually it executes perfectly and writes the result to the specified csv file:
sqlcmd -S tcp:[servername],50001 -d [databasename] -M -K ReadOnly -s , -i "[filepath]\IP007DM_Iteration_NonSP.sql" -o "[Filepath]\IP007DM.csv"
However, if I use the Run Command tool or Run Command event, It opens a command prompt window but doesn't pass the command and just sits as running indefinitely. If I manually enter my command into the cmd window that Alteryx opens I get the error: "'sqlcmd' is not recognized as an internal or external command, operable program or batch file."
It's as if Alteryx is using a different version of cmd.exe somehow, even though I'm specifying the exact same executable I use when running manually.
Any ideas please?