You can translate the question and the replies:

Limit inside Denodo common table expression

Is it possible to limit VQL query output inside common table expressions? I mean something like that: ```with cte as (SELECT * from "DenodoTable" hh order by "holding" desc **--LIMIT 10** ) select * from cte ``` If uncomment "LIMIT 10', above VQL gives "Syntax error: Exception parsing query near 'limit'" error. I can filter by ROWNUM() values, but I can suppose that this leads to performance overhead. All I need - is to transfer some "TOP N" filter to SQL query, that Denodo generates for querying data from source DB (MS SQL)
26-04-2017 11:19:56 -0400

1 Answer

Hi, Whenever I have a requirement to write a VQL query which uses CTE to hold temporary result set and use it for the duration of a SQL statement execution. I make use of the LIMIT rows checkbox which is available on the VQL shell window or use the LIMIT keyword in the main select query to limit the number of rows in my final display. Currently it is not possible to use LIMIT or FETCH keyword inside the WITH clause to limit the records to be holded in the temporary result set. I hope this helps you!
Denodo Team
02-05-2017 09:49:05 -0400
You must sign in to add an answer. If you do not have an account, you can register here