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

Get previous column vale till it reaches another not null value - response (83) by VBurmist

$
0
0

Hi Bikky,
 
There is one more option.   Apart from using the Ordered Analytical Functions, you might want to introduce the Start_date and End_date into the LKP table.   This approach would correspond to the design when you have a Fact table, a Lookup table, and the condition for dates is:
 
Fact_table.Event_date between Lookup_table.Start_date and Lookup_table.End_date
 
 
This is useful when these tables are used by many people, not all of them being comfortable with Ordered Analytical Functions (they are really great though).   
 
Regards,
Vlad.
 


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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