This content has been marked as final.
Show 3 replies
-
1. Re: Teiid SQL syntax for oracle LEVEL
shawkins Aug 8, 2016 9:06 AM (in response to hend.amin)Teiid supports the more standard recursive common table expression feature WITH Clause · Teiid Documentation which in many instances can be instead of the level/connect by feature. See Hierarchical and recursive queries in SQL - Wikipedia, the free encyclopedia or other similar discussions.
-
2. Re: Teiid SQL syntax for oracle LEVEL
hend.amin Aug 8, 2016 9:53 AM (in response to shawkins)I need to create a query that generates a number sequence ..
-
3. Re: Teiid SQL syntax for oracle LEVEL
shawkins Aug 8, 2016 10:10 AM (in response to hend.amin)A sequence with recursive common table expressions is more verbose. With Oracle syntax:
with x (col) as (select 1 as col from dual union all select col + 1 from x where col < 10000) select * from x
Teiid syntax:
with x (col) as (select 1 as col union all select col + 1 from x where col < 10000) select * from x
The where clause controls how far the sequence goes.