Bug #29855 ODBC "SELECT TOP" not supported !!??
Submitted: 17 Jul 2007 20:32 Modified: 17 Jul 2007 20:47
Reporter: Louis Breda van Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3 OS:Windows
Assigned to: CPU Architecture:Any
Tags: ODBC, TOP

[17 Jul 2007 20:32] Louis Breda van
Description:
Hello,

I am trying to use MySQL as a backend for MsAccess via ODBC 3.16 with 5120

Some querys use "SELECT TOP", strange engeough that seems to be unsupported.

I saw some people using limmit as an altenative. I do not like that, not only for technical reasons but also because standard SQL-terms should be supported and it should not be necessary to rewrite a DB when using an other vendor.

If it is not supported, please make it supported! 

Sincerely,

Louis 

How to repeat:
SELECT TOP X,Y,Z
[17 Jul 2007 20:39] Mark Matthews
"SELECT TOP" is not standard sql. It is specific to SQL Server (and perhaps Sybase). 

If you want to "window" your selects without using WHERE clauses, it is always vendor-specific.
[17 Jul 2007 20:47] Louis Breda van
Mark,

If TOP is not real standard SQL, than it is very common at least.

Related to you WHERE statement, I did not write down the whole query(s!!), but all my qyerys do contain a where statement appart "Select * from table;"

Sincerely,

Louis
[18 Jul 2007 6:47] Susanne Ebrecht
Hi Louis,

no RDBMS, that I know (neither Oracle nor DB2, Informix, PostgreSQL) supports SELECT TOP. That is a typical Microsoft only feature.

Always, when you migrate from one system to another you have to make sure, that your software is only using SQL commands, that are defined in the SQL standard.
Otherwise you have to fit your software too.

All RDBMS have some own features, that are not standardised. When you use them you have to know, that you have to figure out other solutions, when you want to migrate into another system.

Susanne