2 Replies Latest reply: Jun 6, 2013 9:22 AM by Mohit Sharma RSS

    Load Min - values of every id + where - Condition

      Hallo,

       

      i have a Problem with my Load-Script

      All i've tried ends with an Invalid Expression Error:(

       

      I have a table similar to this example:

       

      DataTable:

      Product_id     |     Seq_id     |     Phase

      2                         1                    clean

      2                         2                    produce                            <--------------------*1

      2                         3                    produce

      2                         4                    use

      2                         5                    clean

      3                         6                    clean

      3                         7                    produce                            <--------------------*1

      3                         8                    produce

      3                         9                    use

      3                         10                  clean

      4                         11                  clean

      4                         12                  produce                            <--------------------*1

      4                         13                  produce

      4                         14                  use

      4                         15                  clean

       

      And i want to get the Rows marked with *1.

       

      I tried:

       

      1.

      Produce:

       

      Load Product_id,Min(Seq_id ) as MinSeq resident DataTable where Phase='produce';

       

      2.

      Produce:

       

      Load Product_id,Seq_id  resident DataTable where Phase='produce';               (is correct)

       

      ProduceID:

       

      Load Product_id,Min(Seq_id ) as MinSeq resident Produce;

       

      What i am doing wrong?

      Pls help me:)

       

       

       

       

       

       

       

      Sry i can only mark one of u as correct answer and swuehl wasd the faster one;)

      But thanks to both for the fast reply!