Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Teradata Spool issue in Recursive issue - response (4) by dnoeth

$
0
0

Did you ever run the SELECT on it's own?
 
IMHO there's no proper join-condition in the recursive part resulting in huge cross joins, you should check the result when you add a WHERE level <= 3.
Additionally you need to cast T1.RESIL_CAUSE to a larger VARCHAR as the first SELECT of a UNION determines the datatype, so concatenating will result in truncation.
 
Seems you want to to do a kind of GROUP_CONCAT (in a strange way), is there any rule for processing in a specific order? Simply materialize the base data in a Volatile Table including a ROW_NUMBER and then use this to join on t1.rn+1 = t2.rn


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>