by BillyBoyo » Mon Oct 29, 2012 1:17 pm
OK, thanks, that is pretty up-to-date.
It looks like you are investigating the SPLICE to understand how it operates?
I'd suggest while doing this, you put your "fields-involved-in-SPLICE" "out-of-the-way" of existing data - I put mine at 30, 40, 50 with your data.
I think the thing is, you've missed something with WITHEACH, I think.
WITHEACH is working with "pairs" from a set of duplicates and will deal with all pairs in a duplicate to create one record, BUT those output records can only, from SPLICE itself, contain data from the two records in the pair. As well, the WITH that you give relates, on a "positional" basis, to the pair concerned. Your first WITH is for the first pair of records, your second for the second pair of records, etc. Note that for WITHEACH, "blanks" in the field on the second of the pair will overwrite data from the first of the pair.
For WITHALL, you get multiple records for pairs, one fewer than the number of records. Again, the content of the second in the pair which is defined in a WITH overwrites the content of the first in the pair.
You have to read the whole section on SPLICE, you have to work through the examples and your own examples.
Often there will be other ways of doing what you want for which you've initially thought of using SPLICE.