When running a query in a Loop Dataset Activity in a automation script, one may see the error:
ORA-00933: SQL command not properly ended
But the query runs fine in a Execute Script Activity and in the Editor
WORKAROUND
Remove all comments at the end of the query
STATUS
Waiting to be fixed in a future release of Toad Data Point