Mule SQL "Execute Script" element has strange error for SQL statement
The Execute Script operation of the Database connector does not support Selects or operations that return rows.
You should use a Select operation for each Select in the script. Or the appropriate operation of the connector for that particular query. Remove the SET datefirst 1;
for it to work. Do you really need that for this query? If the select doesn't seem to be usiung dateofweek.