Hi all,

Normally if you want to set condition to select data, do if...and
elsif...(or othet ways). However in my case if I want to only select one
product from each customer based on their category in an order of B, C, A
and D, how can I do that? 

Here is sample data:

__DATA__  
Customer ID:    1711
        * * * No record * * *
Customer ID:    842
        Product ID:     716
        Category:A
        Product ID:     1523
        Category:C
        Product ID:     753
        Category:D
Customer ID:    46917
        Product ID:     20401
        Category:A
        Product ID:     9828
        Category:B
        Product ID:     665
        Category:C
Customer ID:    50
        Product ID:     19554
        Category:D
        Product ID:     4309
        Category:A

What I expect output:

Cust    Prod    Cate
1711
842     1523    C
46917   9828    B
50      4309    A

Thanks in advance.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to