Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I having list of year from 2010 to 2016
in my qvd i want to retrieve the latest year and pervious year only
so i need 2016 and 2015 only
May be this:
Max(Year) and
Max(Year) - 1
Hi,
Add a where clause in your loader.
from Data.QVD
WHERE Year >= 2015;
Mark
how declare this in the variable
If you want them as values, then use triggers, else just give the above as definition to your variable
how to achieve this in the if loop condtion in the qvd generator
Hi,
I would need more information on your script and the loop in questions as you may be able to set it in variable and then increment it if needed. depend a lot of the script and what exactly you're trying to achieve
Mark
i have field called year
now if i want to call that field only with current year and previous year
I am not sure, What is mean of Variable.
Perhaps this
SET vCurrYear = Max(Year);
SET vPrevYear = Max(Year) - 1;
Ok, but you mentioned a loop?
If you want it to be dynamic you could add a variable
LET vYear = YEAR(ADDYEARS(TODAY(),-1));
TABLE:
LOAD
*
Resident Location
WHERE Year >= $(vYear);
Mark