9 Replies Latest reply: Nov 5, 2014 1:28 AM by Anand Chouhan RSS

    Data modeling

    Riadh Chaouch

      Hi Guys.

      I have table: Invoice_Table:

       

      LOAD

      Vehicle_Number, { 27170 , 12345, .....}

      Invoice_Sequence,   { 1,2,3}

       

      //  One Vehicle can be sold and credit and re-Sold again, So every time sold it have a Invoice sequence.

      // i concatenated this 2 fields so i can count How many time The vehicle:

      Vehicle_Number & Invoice_Sequence as Key_Vehicle:

      27170-1

      27170-2

      12345-1

      Count(Vehicle_Number)   ---->   i got 2 vehicles.it's not true.

      count(Key_Vehicle)  ---->   i got 3 vehicles. it Work Fine.

      Now i have to Sum the Price But The Price Field is in an Other Table ' Vehicle_Table'.

       

      LOAD

      Vehicle_Number, { 27170 , 12345, .....}

      Price

       

      i link the 2 tables with Vehicle_Number, it's the only key i have.

       

      When i Put the Sum Expression : Sum(Price) -----> it gave me the price of 2 Vehicles.   

       

      But I need the Price for the 3 Vehicles. i want it to depend of the Key_Vehicle, not The Vehicle_Number Field.

       

      Thanks in advance.