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

Recursive Query - response (13) by Sarah_07

$
0
0

Hi Khurram,
The actual condition is, for a particular DND value if the correspoding rec1 value is 0 then latest_dnd should be dnd only. Consider the set of values i have provided as sample.
For the record, dnd_no =100 the corresponding rec1 =200. So this time it searches for dnd_no = 200 and the corresponding rec1=300. again it searches for 300 in dnd column and the corresponding rec1=0, So the latest_dnd would be 300 for the record 100.
It should keep on seraching the column dnd to find its corresponding rec1 = 0. Then it stops there and should fetch the result where the dnd is becoming as zero. Hope you understood what i said here.


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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