3 Replies Latest reply: Feb 26, 2018 7:54 AM by Juraj Misina RSS

    Check if table exists

    Michele De Nardi

      Hi guys,

      i've a question regarding the topic "Check if table exists".

       

      In a normal load I'm using the following code, and it's works fine:

      MyTable:
      Load *
      From MyQvd.qvd(qvd);
      
      If NoOfRows('MyTable') > 0 Then
           Trace MyTable has at least one record
      End if
      

       

      but now I have a different situation.

      I've got one qvd per day (MyQvd_2018-01-01.qvd, MyQvd_2018-01-02.qvd, MyQvd_2018-01-03.qvd and so on...) so I've setup a load like:

      MyTable:
      Load *
      From MyQvd_*.qvd(qvd);
      

       

      How can i check if each qvd has records or not by using this load (with the * on the qvd name) in a short way? Because there are some cases where the qvd exists without record and i want to find all the cases.

       

      I would like to avoid "for... next" loops...

       

      Thanks