This is an error that is coming from SQL server and not from windows batch script.
If you are passing Parameter with special characters to your procedure make sure you separate the argument list by, (comma) and enclose it with single quotes
C:\Users\>cmd /c "G:\Scripts\bat_scriptToInvokeAStoredProcedure.bat 10/10/2017 12/10/2017 1"
content of .bat script is as follows.
"C:\Program Files\Microsoft SQL Server\120\Tools\Binn\osql" -U informatica -P password -S DWHServerName\DWHServerName -d CDW -Q "exec p_Play_Populate_Trips '%1', '%2', '%3'"
If you are passing Parameter with special characters to your procedure make sure you separate the argument list by, (comma) and enclose it with single quotes
C:\Users\>cmd /c "G:\Scripts\bat_scriptToInvokeAStoredProcedure.bat 10/10/2017 12/10/2017 1"
content of .bat script is as follows.
"C:\Program Files\Microsoft SQL Server\120\Tools\Binn\osql" -U informatica -P password -S DWHServerName\DWHServerName -d CDW -Q "exec p_Play_Populate_Trips '%1', '%2', '%3'"
No comments:
Post a Comment