3 Replies Latest reply: Jul 19, 2011 1:07 PM by Jamie Weber RSS

    Order By within Preceding Load

      I'm building a flag with a script that will compare the previous record to the current and flag differences. My current script is in the form of:


      LOAD *, If(Previous(B) = B, 0, 1) as flag;

      LOAD *

      Order By C;

      LOAD A, B, {expression} as C

      RESIDENT Data;


      You'll likely suggest I put the Order By within the bottom LOAD, but the multiple preceding LOADs are actually more complicated than what's represented here. For this discussion, I'd like to know if I can get the above to work.


      The error states I'm missing a "FROM" syntax, suggesting you need a FROM for the Order By to work.