3 Replies Latest reply: Apr 6, 2015 1:32 AM by anbu cheliyan RSS

    Switch Satement in EditScript

    Monish Mulpuri

      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

      IMG_0575 (1).JPG