Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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 CreditAttribution: fizk commentedWhy did you use
$table.$field
instead of$as
?Comment #3
ehuelsmann CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: fizk commentedCommitted, thanks!