Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Reload different sqls in same qvw at different times

Hi,

My qvw i have several sqls and i want to schedule the reloads of those sqls in different time frames,

say SQL1 @ 07:00 am every day

SQL 2 @ 2.30 pm every day etc

is this possible

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like:

If  hour(Now())=7 Then

          SQL query1

     Else If hour(now())=14 and minute(now())=30 Then

          SQL query2

     End if

End if

And the reload for the qvw has to be scheduled accordingly (at least twice at those times)

View solution in original post

5 Replies
tresesco
MVP
MVP

May be like:

If  hour(Now())=7 Then

          SQL query1

     Else If hour(now())=14 and minute(now())=30 Then

          SQL query2

     End if

End if

And the reload for the qvw has to be scheduled accordingly (at least twice at those times)

Not applicable

Hi,

You want this to be implemented through QMC?

If so we can schedule two different tasks for the same QVW to run at different times with a if condition included in the script. Like SQL1 in one if condition which will be true for one reload time and false for other reload time.

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Yes, it works . But then the data already loaded in previous reload get disapired.

I want to keep the data of SQL2 when SQL1 run and vis versa.

Not applicable

You can store the data in QVD's and use them

tresesco
MVP
MVP

Try like:

If  hour(Now())=7 Then

          Table1:

          SQL query1

        Store Table1 into table1.qvd (qvd);

     Load * from table2.qvd(qvd);

    Else If hour(now())=14 and minute(now())=30 Then

          Table2:

          SQL query2

        Store Table2 into table2.qvd (qvd);

     Load * from table1.qvd(qvd);

    End if

End if

To get this working, you have to run the store once to get qvd created.

Or, you can try with Partial reload