I,ve got a CSV file with 3 levels of data:
CITIES ( 1…N)
- City ( alfa )
CUSTOMERS OF CURRENT CITY (1…N)
- Customer ( alfa )
INOICES OF CURRENT CUSTOMER (1…)
- InvoiceID (alfa )
- Amount ( num )
Sample Data:
///////////////////////////////////////////////////////////////
City;Customer;InvoiceID;Amount
BCN;CL1;F11111;23424
BCN;CL1;F222;124124
BCN;CL1;F333;23525
BCN;CL1;F452535;52335
BCN;CL1;F5;52355
BCN;CL2;F343;35235
BCN;CL2;F3235;88
BCN;CL2;F23552;52
BCN;CL2;Fg5fg;632
BCN;CL2;F63gg;5235
BCN;CL3;F3463;5235
BCN;CL3;F46v gg;23525
TAR;CL889;F0933;556
GIR;CL53;Fdgdr56;673
GIR;CL53;Fbdr54;04
GIR;CL54;F634634;6234
GIR;CL54;F346346;234
GIR;CL54;F34646;2352
GIR;CL54;F34646;744
///////////////////////////////////////////////////////////////
I Set the boundaries to “ON CHANGE” field City, that’s ok.
Then a loop “until no more elements” to read the customers of the current city. Store in a table CUST_LIST that’s is ok
Inside this loop, another loop “While statement is true” comparing the current customer field with the previous one. In this loop I read the invoice fields InvoiceID, Amount into the table INV_LIST
The goto step is inside the second loop
The first Customer of each record ( CITY ) is ok, but the next ones get mixed values in the “InvoiceID” and “Amount” fields from the first one and the current one. The number of records is ok however
Its look like the INV_LIST table is not initialized on create a new entry
I guess that the problem must be on the goto field.
Any clue?