MS SQL Server is the db. Get the error when trying to add sorting by "Nodequeue: Position in nodequeue and other parameter" to a view.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | nodequeue-mssql_ifnull_error-2007070-1.patch | 727 bytes | sgorobet |
MS SQL Server is the db. Get the error when trying to add sorting by "Nodequeue: Position in nodequeue and other parameter" to a view.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | nodequeue-mssql_ifnull_error-2007070-1.patch | 727 bytes | sgorobet |
Comments
Comment #1
sgorobet commentedChanged IFNULL to COALESCE, also MS SQL Server doesn't like aliases in WHERE, ORDER BY, SORT BY clauses, so I had to change that part too.
I think 7.x-3.x is affected as well.
Comment #2
fizk commentedWhy did you use
$table.$fieldinstead of$as?Comment #3
ehuelsmann commentedHi, This is a problem for PostgreSQL too. I simply replaced the one occurrence of IFNULL in the module code by COALESCE. Basically as fizk suggests. This solved my issues with this module. Please do the replacement so other database users can benefit from this module without modifications.
Thanks in advance!
BTW, I would submit a patch if the replacement wasn't too trivial.
Regards,
Erik.
Comment #4
ehuelsmann commentedProvided a patch after all. The hardest part was to find out how to clone git repositories for Drupal :-)
BTW, the reason the OP changed the $as to $table.$field, is explained in his second upload commend: "MS SQL Server doesn't like aliases in WHERE, ORDER BYand SORT BY clauses"....
Comment #7
fizk commentedCommitted, thanks!