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

Raher created an issue. See original summary.

renatog’s picture

Category: Bug report » Support request
Status: Active » Fixed

Hello 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.