"Hughes, Jim" wrote:
> If I use PICK FROM AFTER .....TO AFTER  in a callpipe will the PICK
> cease once the TO AFTER is satisfied?

No, PICK FROM ... TO ... is like BETWEEN:  it selects *all* the sets of
records starting with one match and ending with the other.  To get just
the *first* set, you need PICK FROM ... | PICK TO ... instead.

Note, though, that it's not quite that simple if you're not using FROM
AFTER.  In a case like pulling out a single USER entry, where you're
keeping the FROM record and it also satisifies the TO criterion, getting
just the first match is as complicated as it ever was, handling the
first record separately:

  (end /) ... 
    | pick anycase from substr 1 of w1 == 'U' and w2 == 'thisuser'
    | first: take 1
    | rest: fanin
    | ...
    / first:
    | pick anycase to substr 1 of w1 == 'U'
    | rest:

It would have simplified this kind of selection if BETWEEN etc. and PICK
had a way to specify that you wanted just the first match.

¬R

Reply via email to