Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 Mar 2008 @ 14:52:14 GMT


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


Subj:   Re: Recursive Query
 
From:   Michael Larkins

David:

Your seed statement probably should not be a join. You need to only pull only the current numbers. Then you grow the table recursively from these using the join.

In your case, it does not look like your design allows for a way to determine the current. So, you might need a NOT IN subquery to determine current rows, where normally there would be an effective date used to make this determination.

Once you have planted the starting seeds, you join and union the seeds to the table to get those matching rows that cascade off of the seed rows.

Hope this helps give you an idea.


Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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: 15 Jun 2023