-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed bug with CSV export #68
Conversation
tried this patch but we still get a failure with the date fields when using postgres. hardcoding this seems to fix it for us: (postgresql specific code though) here's the error in PostgresDebug info: ERROR: UNION types text and date cannot be matched SELECT qr.id || '' || 'dropdown' || '' || qrs.id AS id, AND qr.survey_id = $1 AND qr.complete = $2 AND qr.survey_id = $4 AND qr.complete = $5 AND qr.survey_id = $7 AND qr.complete = $8 AND qr.survey_id = $10 AND qr.complete = $11 |
Thanks. I'll look at this later this week. |
Can one of you explain what the actual issue is? Is there a specific response type that is failing? What is the actual data types of expected type vs. that actual type causing the issue? |
In Oracle the problem is because of the CLOB fields (TEXT in Moodle), which have a lot of problems comparing directly and need converting them to varchar or similar. |
Hi. My understanding of the "sql_compare_text" function is that it is used to return sql that allows comparison of a text field to a varchar field. But, you aren't using it in a compare context. You are using it where the variable is listed in the "SELECT" part. Does that make sense to to? Also, why "1000"? |
Replaced sql_compare_text to sql_order_by_text function and opened new PR: #73 |
Our databases are Oracle and we've detected this bug in some cases (with MySQL is working properly). We've tried to find a generic solution (in Oracle, converting TO_CHAR the qrX.response field is also working).
Tested in Moodle 3.1.1 with MySQL and Oracle databases.