Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to do a rolling 13 in SQl select statement?

Hi,

Here i am pulling the data from source and i want to get the data only from past 13 months rolling.

i was trying to use a variable to store this,

Let vRolling=date(MonthStart(AddMonths(Date(Today()),-13)))

then,

SQL SELECT *

FROM "Table_name" Where Date_Field>$(vRolling)

i am getting an error which says script line error, can some one help me whats wrong with the path?

I know that we cannot use qlikview functions during ODBC query but i tried.

10 Replies
Not applicable
Author

Thanks Mohan it was the Semicolon that i was missing from the sytax but its working now.