>Ed,
>
>Just to let you know what I am trying to do:
>
>I have a Customer table and a child Purchased table. I want an SQL to determine those Customers who bought
>SOAP and TOWELS and TOOTHBRUSH.
>
>The UDF (obviously not the one show) determines if the pair Cust_id,Item_id exists for each Item in the search list
>(by using SEEK) and returns .T. or .F. The values of Item_id are stored in an array.
>
>Is this a totally off the wall approach and dangerous to boot?
select cust_id from customer where cust_id in
(select cust_id from purchased
where item_id = soap and cust_id in
(select cust_id from purchased
where item_id = towels and cust_id in
(select cust_id from purchased where item_id = toothbrush)
)
)