HomeActive Query BuilderAQB gives error, but postgresql works fine

AQB gives error, but postgresql works fine


The following query works fine in postgresql, if i run it from pgadmin.
(
Select * From schema1.tbl1
Order By col1 Asc
Limit 5 Offset 0
)
Union All
(
Select * From schema1.tbl1
Order By col1 desc
Limit 20 Offset 5
);

But AQB throws the following error while syncing sql:
"Invalid SELECT statement.
Unexpected token "Order" at line 3, pos 2"

I am using PostgreSQLSyntaxProvider as syntax provider.

Why does this problem occur? Have I missed setting any property?

What can be the solution for such sqls, where the syntax is supported in postgresql db, but does not work for AQB?

Thanks

[* If I put the limit/offset ouside the subquery, then it works fine.]
Arif | email
September 3 2008, 06:26 AM
This topic is closed