Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load a yearly snapshot of data

Hi,

I need to read in a yearly snapshot of data. I can write the code in a SQL procedure like this:

SET @MaxDate = '2010-08-15'
SET @CurrentDate = '2000-08-15'

WHILE @CurrentDate <= @MaxDate
SELECT DATA1
FROM TABLE
WHERE DATE = @CurrentDate

SELECT @CurrentDate = DATEADD(yy, 1,@CurrentDate)
END

How can I write the equivalent logic using QlikView syntax?
I am not sure how to structure the loop and how to increment the date.

Thanks.

0 Replies