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.
Hi,
I'm getting an MS SQL error when creating an archive block
SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near the keyword 'AS'.
Here is what the views query looks like
SELECT TOP(25) AS created_year_month, COUNT(node.nid) AS num_records
FROM
{node} node
WHERE ( (( ([node].[status] = '1') AND ([node].[type] IN ('front_page_news_item')) )) )
GROUP BY
ORDER BY created_year_month ASC
Is anyone else experiencing this issue?
Thanks,
Raher
Comments
Comment #2
renatogHello Raher how are you? Thanks a lot for reporting this. By default, Drupal is supporting MySQL (MariaDB) and PostgreSQL. I tested the integration with Drupal driver for SQL Server and SQL Azure and it worked using the last version. So please do it, upgrade your Drupal Views to the last version, if you can upgrade your Drupal version, Upgrade your sqlsrv to the last version as well. Please remember to run /update.php and clear all caches and try again. It'll solve the problem for you but if you have any problems feel free to reopen. Thank you so much, Raher.