Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array passing in SQL UDF
Message
De
08/01/2000 20:59:40
 
 
À
08/01/2000 20:09:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00314970
Message ID:
00315059
Vues:
1561
>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)
             )
      )
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform