3 Replies Latest reply: Dec 16, 2013 5:52 AM by Friedrich Hofmann RSS

    "Piggyback LOAD": Is the table sorted?

    Friedrich Hofmann

      Hi,

       

      I want to build sth. like the following

       

      Presence_data:

      LOAD

            *,

            IF(Pers_ID = PREVIOUS(Pers_ID), 1, 0)

      ;

      LOAD

          %Date,

          Pers_ID

        ...

      RESIDENT ...

      ORDER BY Pers_ID asc, %Date asc

      ;

       

      For the PREVIOUS() fct to work correctly and return me a proper 1/0 field that I can sum up in the chart, it is essential that the table be already sorted by these two fields.

      => Will this work in this way? Can I rely on the table being already sorted when I use such a "piggyback LOAD"?

       

      Thanks a lot!

      Best regards,

       

      DataNibbler