Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


kwilliams161
2023-10-19T22:49:36Z
The following line in my Oracle SQL statement causes an error:

   AND Claim.OpenDate >= (SYSDATE - {USERVAR(UpdRecordInterval)}/1440)


The error is
Quote:

ERROR [HY000] [Oracle][ODBC][Ora]ORA-00907: missing right parenthesis



If I remove the
Quote:

{USERVAR(UpdRecordInterval)}

and replace it with an integer -- 600, it runs without a problem.

How can I fix this?
Sponsor
Forum information
bweston
2023-10-23T13:45:35Z
This might or might not help as an interim solution; I vaguely recall running into possibly-related issues in the past with Powershell...can you try putting a space between the } and the /? ...If that is valid syntax in Oracle SQL?

The other possibility that comes to mind is to make sure your user variable's type is set to int32, but I don't think Visualcron automatically quotes strings when using them this way anyhow and I don't know if Oracle would get upset about it even if that were the case, so I doubt that's the issue. I think it's more likely to be a variable-replacement parsing issue.

Another thing you could try would be creating a file write task, or a powershell task that just echoes a string (that's what I prefer, but if handling quotation marks in Powershell isn't already practically second nature it can be a little tricky), or something along those lines, just to try to make absolutely sure that the query (with the variable in it) seems to be coming out the way you intended. I doubt you've somehow messed up your variable contents (that was the problem the time this approach most memorably helped me), but if the space idea above doesn't help, this might help with tracking down what's going wrong. Of course, if the parsing logic isn't the same between the two types of tasks, it could be misleading at worst...
Scroll to Top