I am running drupal 7 on SQL Server and IIS7. I am getting a syntax error and would like to know how to change the files' syntax so that I can use this module to export view data to CSV. I am a SQL Server DBA/Developer with limited knowledge of Drupal and this module. Any guidance/tips/code would be appreciated. tia.
Debug:
'Exception: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword \'SELECT\'.'
in views_data_export_plugin_query_default_batched->execute() (line 823 of C:\inetpub\wwwroot\dataentry\modules\views_data_export\plugins\views_data_export_plugin_display_export.inc).
PDOException: SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name 'views_data_export_index_5'.: SELECT COUNT(*) FROM {views_data_export_index_5}; Array ( ) in views_data_export_plugin_display_export->execute_initial() (line 248 of C:\inetpub\wwwroot\dataentry\modules\views_data_export\plugins\views_data_export_plugin_display_export.inc).
Comments
Comment #1
trapper-1 commentedupdate to this post - I am willing to pay for help to get this working with SQL Server. If this is not the place to post for paid help, please advise where I can get someone to do this for some money.
Comment #2
trapper-1 commentedupdate - for anyone else reading this in the future having similar problems - all I needed to do was turn off the 'batched' property. also, for reference, the export has it's own 'pager' property which does not coincide with the view that you attach the export to.
Comment #4
otolithe commentedI'm having the exact same issue here, on a LAMP system:
Error message is:
When batch export is activated... I'm running 7.x-3.0-beta6 but it fails also with 7.x-3.0-dev.
I'm running Drupal 7.12, Views 7.x-3.2 and ctools 7.x-1.2
Seems like the module can't create the required MySQL table view...
Any help would be appreciated.
Comment #5
steven jones commentedThis is not the same issue.
Comment #6
dobe commentedThis is not fixed. I am guessing it has to do with the SQL driver module. I am going to move over there as I just ran into this. I believe that what is going on is views data export is creating a temp table that the sql driver is not playing nicely with? Maybe I am wrong.
I will try with the 2.x version to see if that resolves it.
Comment #7
david_garcia commentedThis totally looks like temp table not created.
This was fixed in 7.x-2.x, temporary table support was completely broken in 7.x-1.x.
Support for temporary tables was added in this commit:
http://cgit.drupalcode.org/sqlsrv/commit/?id=8084e74
This is the issue about it
#1860152: Support for temporary tables is broken
Comment #8
dobe commentedOk so I think I finally setup an environment that runs 2.x. I was having some issues with not having ODBC 11 installed.
So I have the latest 7.x-2.x version enabled.
PHP 5.6.9
MS SQL Server PDO extension 3.2.0.0
I am still getting the same error though.
PDOException: SQLSTATE[42S02]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Invalid object name 'views_data_export_index_13'.: SELECT COUNT(*) FROM views_data_export_index_13; Array ( ) in views_data_export_plugin_display_export->execute_initial() (line 301 of C:\inetpub\wwwroot\drupal\sites\all\modules\contrib\views_data_export\plugins\views_data_export_plugin_display_export.inc).
and
User notice:
'Exception: SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near the keyword \'SELECT\'.'
in views_data_export_plugin_query_default_batched->execute() (line 899 of C:\inetpub\wwwroot\drupal\sites\all\modules\contrib\views_data_export\plugins\views_data_export_plugin_display_export.inc).
Comment #9
david_garcia commentedWould need to take a closer look, but probably this is failing:
Comment #10
dobe commentedYour prolly right, it is probably the SELECT implementation.
Comment #11
david_garcia commentedYes it was, a long time ago indeed:
#2015361: SQL Server Compatibility
Comment #12
david_garcia commentedThere's nothing that can be done for this at the database driver level. The module is manually issuing a very MySQL specific query.
If anything is to be done, it's in the contrib that builds this query.