Dear Community,
I'm impressed by the powerful database feed and the way how to execute queries. But I'm having issues with the RANK() OVER (PARTITION BY) statement, which does not work in the database feed query field.
The error message:
The following error occurred when running SQL query "SELECT STKGRP, AMT_LCY Rank()OVER(Partition by STKGRP Order by AMT_LCY DESC) as ‘Ranking’ FROM dbo_SALEINVOICE" on database "Access": [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'AMT_LCY Rank()OVER(Partition by STKGRP Order by AMT_LCY DESC)'.
The underlying database is MS Access which again uses linked ODBC tables to gather the data from SQL Server 2005.
I haven't had any bigger problems with this setup so far, but this problem is really tough.
Here's a brief introduction into the RANK() OVER statement:
http://riteshshah.wordpress.com/2009/03/03/use-of-rank-and-partition-by-clause-in-sql-server-2005/
Thank you very much!
Helmut Barro on
Are you sure that MS Access supports the
function? I could find neither keyword in the list of reserved keywords for Access' SQL dialect (it does not even exist for e.g. SQL Server 2000, if I'm informed correctly).
Alternatively, it could be a construct that is not supported by the JDBC-ODBC-Bridge.
Have you tried to execute that statement directly via a dedicated JDBC driver on a SQL Server 2005 database?
As we mentioned before, we do not recommend to use the JDBC-ODBC-Bridge in productive environments, and hence cannot give real support for those cases, especially as this seems to me to be a database-specific MS Access issue. I'm happy to have another look into it if you prove me wrong :-)