Archives of the TeradataForum
Message Posted: Fri, 18 Sep 2015 @ 16:30:44 GMT
<-- Anonymously Posted: Friday, September 18, 2015 07:57 -->
I am working on a requirement for updating the data for a customer which is spread in multiple rows to be cascaded post updation into next rows. E.g is as below:
Deduction Priority Deduction Following Balance Order Sum Deduction GBP 11.05M 1 15 GBP -3.95M GBP 11.05M 3 0 GBP 11.05M GBP 42.17M 2 3.95M GBP 38.22M (from Collateral Deduction Priority Order 1)
Here for the Priority order 1 then we deduct the deduction sum from the balance and when the balance goes below 0 we go to the second priority order and reduce the absolute value (3.95) from the second balance value. This process should continue to the further down levels if the net reduced balance remains negative.
So, can you please help me understand how I can attain a working loop within BTeq as we do not have an environment where I can write a procedure. Also we do not know how many times we need to keep checking for the balance to update, so writing a fixed no. of checks with a jumping iteration from BTEQ will help, as is also not an advised way of working.
Also using recursion will not help in updating the next row of data with the updated balance for me to proceed with the checks.
Any questions please let me know, as I was not able to find anything meaningful online.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|