Hi Mike.

So it would appear.  I haven't had a chance to go through the replies yet but,
in answer to your question my input data set contains:

field1 other_fields

I can SORT UNIQ on field1 to get one example of each field1 in my output data.
 What I actually need is multiple examples, up to N, should they exist within
the input data.

So that given N=2 and the input:

aaa 1
aaa 2
aaa 3
bbb 1
bbb 2
ccc 1

my output would be:

aaa 1
aaa 2
bbb 1
bbb 2
ccc 1

(The order is not important, nor by extension does it matter is its the first
or last N.)

i

------ Original Message ------
Received: Tue, 28 Oct 2008 06:03:25 PM GMT
From: Mike Walter <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: UNIQUE n

> On Tue, Oct 28, 2008 at 12:23 AM, Ian S. Worthington
> <[EMAIL PROTECTED]> wrote:
> 
> > I need a way to do something like a SORT UNIQ but extracting n records
> not
> > just the first/last one.
> >
> > I reckon I can do it with LOOKUP with a DROP n in the "add to" path.  Is
> there
> > an easier way?
> 
> Ian,
> 
> Based on the various example posted so far, it seems that there are
> "unique" and "multiple" ways to interpret your request for help.
> 
> Perhaps a short example of your record input stream and desired output
> might yield more specific replies?
> 
> Mike Walter
> Hewitt Associates
> Any opinions expressed herein are mine alone and do not necessarily
> represent the opinions or policies of Hewitt Associates.
> 
> 
> 
> 
> The information contained in this e-mail and any accompanying documents may
contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if this
message has been addressed to you in error, please immediately alert the
sender by reply e-mail and then delete this message, including any
attachments. Any dissemination, distribution or other use of the contents of
this message by anyone other than the intended recipient is strictly
prohibited. All messages sent to and from this e-mail address may be monitored
as permitted by applicable law and regulations to ensure compliance with our
internal policies and to protect our business. E-mails are not secure and
cannot be guaranteed to be error free as they can be intercepted, amended,
lost or destroyed, or contain viruses. You are deemed to have accepted these
risks if you communicate with us by e-mail.
> 

Reply via email to