Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to execute the load and store statement only if the day is Sunday. If it is Sunday and if the table is already stored then it should not run. Can somebody help me with my code. What is wrong in my Switch Statement.
Thanks in advance.
SWITCH
IF(WEEKEND(DATE(QVDCREATETIME('C:\Users\ABC\Lastweekque.qvd'))) = DATE(WEEKEND(TODAY())),1,2)
CASE 1
TRACE('LAST WEEK QUE QVD IS ALREADY UPDATED');
CASE 2
Currweekque:
LOAD*FROM Lastweekque.qvd(qvd)
WHERE Uni_ReloadWeek > DATE(WEEKEND(TODAY())-21);
CONCATENATE
LOAD
WEEKEND(TODAY()) AS Uni_ReloadWeek,
wa_Include_Roots AS Uni_Include_Roots,
RecID AS Uni_RecID
FROM RAITS;
STORE Currweekque INTO Lastweekque.QVD(QVD);
ENDSWITCH
------
----
Write the If statement on the same line as Switch
SWITCH IF(WEEKEND(DATE(QVDCREATETIME('C:\Users\ABC\Lastweekque.qvd'))) = DATE(WEEKEND(TODAY())),1,2)