drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Zarei <alexanderz.si...@gmail.com>
Subject Fwd: Recursive CTE Support in Drill
Date Thu, 09 Jul 2015 18:33:25 GMT
+ user@drill

Hi All,

I am trying to come up with a query which returns a given number of rows
without having a real table on Storage.

I am hoping to achieve something like this:


DECLARE @start INT = 1;DECLARE @end INT = 1000000;
WITH numbers AS (
    SELECT @start AS number
    SELECT number + 1
    FROM  numbers
    WHERE number < @end)SELECT *FROM numbersOPTION (MAXRECURSION 0);

I do not actually need to create different values and returning identical
rows would work too.I just need to bypass the "from clause" in the query.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message