2 Replies Latest reply: Jun 4, 2014 12:27 PM by Jeremiah Kurpat RSS

    What is a good way to tell if a table loaded in has no data?

    Jeremiah Kurpat

      Hello Everyone,

           I was wondering what a good way would be to tell if a table that is loaded in has no data. To clarify, I am using script like:

       

      Table1:

      NOCONCATENATE LOAD *

      Resident Data

      where A = 1 and B like '$(vName)';

       

      Now it may be that the part "B like '$(vName)'" might not pull anything in because it does not match any values. This would make the table blank with no data inside (like if you went to table viewer and cannot preview data because nothing is there).

       

      If that is the case, I want to Concatenate onto it with something that does have data like:

       

      Concatenate(Table1)

      Load *

      Resident Data

      where A =1 and B like 'HardCodedValue';

       

      But I don't want it where I concatenate the table with this new data if there is already something there. So I'm wondering if there is any good way to say "If the Table1 has no data, then concatenate"?

       

      Thanks!