Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
I have a requirement in which I want to load a table again and again for the loop.
let vStartYear = Year(Date(AddYears(Today(),-1),'YYYY-MM-DD'));
let vEndYear = Year(Date(AddYears(Today(),+1),'YYYY-MM-DD'));
do
NoConcatenate//Base to start
BasePop_Temp:
Load
Distinct
Com_Num_Base,
CompNumExist,
PlT_Base,
EffDt_Bae,
ExpDt_Base,
Prd_Line_Base,
'Base' as Flag_Base,
Com_Num_Base&'-'&month(EffDt_Bae)&'-'&Prd_Line_Base as RenKey
Resident Table1 Where Year(Prd_Line_Base) = '$(vStartYear)';
NoConcatenate
BasePop: //next year
Load
Distinct
Com_Num_Base,
CompNumExist,
PlT_Base,
EffDt_Bae,
ExpDt_Base,
Prd_Line_Base,
'Ren' as Flag_Base,
Com_Num_Base&'-'&Prd_Line_Base as EnhaceKey
Resident Table1 Where Year(EffDt_Bae) = '$(vStartYear)'+1 and Exists(RenKey,Com_Num_Base&'-'&Prd_Line_Base);
I want to load BasePop, which loads for each year to concatenate one after the other for each year.
Thanks in advance
Ferha
Something like:
for i = $(vStartYear) to $(vEndYear)
// defining n variables to consider different fields/expressions/conditions in the iterations
YourTable: load ... resident ...;
next