Although Stefan's solution seems the cleanest, here's another attempt to loop the table and get the records. I haven't tested it, but since it took me some time to write it, here it goes
Original: LOAD CleTab AS Orig_CleTab, CodeSoc AS Orig_CodeSoc, CodeTable AS Orig_CodeTable, CodeUsi AS Orig_CodeUsi, Data AS Orig_Data FROM [Table à faire.xls] (biff, embedded labels, table is Sheet1$); FOR i = 1 TO 48 STEP 6 Processed: LOAD RecNo() AS No, Orig_CleTab AS CleTab, Orig_CodeSoc AS Code, Orig_CodeTable AS CodeTable, Orig_CodeUsi AS CodeUsi, Mid(Orig_Data, $(i), 6) AS Data RESIDENT Original; NEXT
Hope that helps.
For loop code checked according to Stefan's post suggestions
do you have experience what is performing better, a while or for-loop?
I would guess it doesn' really matter on a resident table, but maybe when loading from an external data source (because the while doesn't need a repeating query, where the for-loop performs repeating table loads, if not optimized by QV)?
(To be equivalent with my while-approach, I think you could remove the outer for-loop and you should increase the upper limit in the inner loop from 42 to 48, but that's just for the record).
All, have a nice day,
Actually I haven't tested this case in particular, because both have pros and cons. But on my general experience, the for next loop is usually slower, because is a load with all the transformation (that is very similar to the one in the while loop) but it concatenates in each step, and it adds extra time to the load process that the while does not.
I will try both with several million records in the same computer and get back with the results.
For the record, you're right, and so I correct the code, just in case. Thanks for noting, (that's the way it goes when I don't test before posting).