Archives of the TeradataForum
Message Posted: Tue, 19 Feb 2008 @ 14:42:46 GMT
If I understand your requirements correctly and didn't want to use a table to generate rows, I would use the original table and a recursive derived table, something like this:
with recursive temp (a2, b2,lvl) as (sel max(a), max(b),0 from numtest union all sel a2+1,b2+1,1 from temp where a2 < 100) ins into t1 sel a2, b2 from temp where lvl > 0
Of course this is predicated on having V2R6.
Hope this helps,
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|