Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 25 Mar 2009 @ 20:18:43 GMT


     
  <Prev Next>  
<<First
<Prev
Next>
Last>>
 


Subj:   Can View refer a recursive view?
 
From:   Anantaraman, Kumaran

I have a recursive view defined as follows :

     CREATE RECURSIVE VIEW the_numbers_vw (n) AS (
        SELECT n
        FROM (SELECT 0) AS a(n)
     UNION ALL
        SELECT n + 1
        FROM the_numbers_vw
        where n < 10
     );

     sel * from the_numbers_vw; /* this is fine */

     sel
        t1.*, t2.*
     from
        the_numbers_vw t1, the_numbers_vw t2
     where
        t1.n = t2.n
     ; /* this is also fine */


     replace view nest_vw as sel * from the_numbers_vw; /* get error here */

The error is

6926: WITH [RECURSIVE] clause or recursive view is not supported within WITH [RECURSIVE] definitions, views, triggers or stored procedures.


The manuals are not easy to read on this : so here is my question : Can I define a simple view that refers a recursive view in it? If not, why not?? And what are my workarounds / options?


Kumar



     
  <Prev Next>  
<<First
<Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016