Fix small issue converting query parameters to SQL; fix error with OCI and query limits where query was not created properly