Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Friends
I have developed a QV document with do while loop. But It does not run properly. I have attached the same and kindly help me to correct the syntax.
try this:
sales:
LOAD POLICY_NO,
P_FROM
From
TEST.xls
(biff, embedded labels, table is Sheet1$)
;
left join
load POLICY_NO,min(right(P_FROM,4)) as Y1 Resident sales Group by POLICY_NO ;
Dear Friends,
Kindly help me with a solution
please give more information what you are trying to achieve!
I want my Output table to look like given below with additional column(Y1) being populated with min year of P_From.
POLICY_NO | P_FROM | Y1 |
00KU1C000748 | 10/29/2015 | 2015 |
00KU1C000748 | 10/29/2016 | 2015 |
00KU1C000748 | 10/29/2017 | 2015 |
00KU1C000748 | 10/29/2018 | 2015 |
00KU1D000662 | 5/19/2016 | 2016 |
00KU1D000662 | 5/19/2017 | 2016 |
00KU1D000662 | 5/19/2018 | 2016 |
00KU1D000662 | 5/19/2019 | 2016 |
try this:
sales:
LOAD POLICY_NO,
P_FROM
From
TEST.xls
(biff, embedded labels, table is Sheet1$)
;
left join
load POLICY_NO,min(right(P_FROM,4)) as Y1 Resident sales Group by POLICY_NO ;
Thanks
Is there any possibility of doing the same with do while loop ?
i think with a do while loop you cant achieve your desired output!
Never use a loop when you can use a join. Loops are very slow compared to operations that work on sets of records instead of on one row at a time.
Thanks for your valuable advice. I will do it with a join. Still I like to know why my do while does not work. If you can let me have correct script for do while for my knowledge please.