Guys
It seems that CTRL-M is stripping out %2 from the SQL that should be run and therefore it cannot resolve the correct exit criteria. In this case it should return a 0. We're not sure why CTRL-M would be doing this?
The CTRL-M command is to run:-
osql.exe -d thinkfolio_TST1 -E -S mg1vdbaz06 -n -Q "EXIT (select count(*)%2 from LogEvent where sDescription in ('Starting ExecuteUpdate() with command <49>','Finished ExecuteUpdate() with command <49>') and dtProcessStart > DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0)) a)”
Yet the sysout log shows:-
osql.exe -d thinkfolio_TST1 -E -S mg1vdbaz06 -n -Q "EXIT (select count(*) from LogEvent where sDescription in ('Starting ExecuteUpdate() with command <49>','Finished ExecuteUpdate() with command <49>') and dtProcessStart > DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0)) a)”
Any thoughts as to why the %2 maybe missing?, do we need a different syntax?
Thanks
syntax error
Windows Might be stripping it out since windows uses the percent symbol for %variableName% and for paths "\\myserver\myfolder\file%20name.txt". I would look into escape characters like in this post http://stackoverflow.com/questions/1907 ... batch-file. Something like including a space between operators in this instance can make a difference ".... (*) % 2 ..."
Another option would be to run your query using Control-M for Databases directly against the database instead of having to jump through the commandline interface. You would then get to avoid this problem completely.
You could also try packaging it into a script.
Another option would be to run your query using Control-M for Databases directly against the database instead of having to jump through the commandline interface. You would then get to avoid this problem completely.
You could also try packaging it into a script.
- moldyscull
- Nouveau
- Posts: 2
- Joined: 18 Nov 2013 12:00
Thanks for the information! This might help:)cjdesch wrote:Windows Might be stripping it out since windows uses the percent symbol for %variableName% and for paths "\\myserver\myfolder\file%20name.txt". I would look into escape characters like in this post http://stackoverflow.com/questions/1907 ... batch-file. Something like including a space between operators in this instance can make a difference ".... (*) % 2 ..."
Another option would be to run your query using Control-M for Databases directly against the database instead of having to jump through the commandline interface. You would then get to avoid this problem completely.
You could also try packaging it into a script.