Kenneth,
Create a cursor AllItems that has the N items in it.
select custid, count(*) as cnt ;
from purchased ;
inner join AllItems ;
on purchased.itemid = AllItems.itemid ;
into cursor TheyBoughtThemAll ;
having cht = 3
>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?