Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP60- SQL
Message
De
09/07/1999 00:57:39
 
 
À
09/07/1999 00:36:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00239266
Message ID:
00239269
Vues:
10
>The problem:
>Write a SQL command to retrieve the name and addresses of all customers that HAVE NOT made purchases this year.
>
>Thank you in advance.
>
>Assume the use of the following tables:
>
>TABLE 1 = NAME_ADDR
>CUSTID C(10)
>NAME C(30)
>ADDRESS1 C(30)
>ADDRESS2 C(30)
>CITY C(30)
>STATE C(2)
>ZIP C(9)
>
>TABLE 2 = PURCHASE
>CUSTID C(10)
>ITEMID C(10)
>QUANTITY N(3)
>AMOUNT N(9,2)
>PURCH_DATE D(8)

SELECT * ;
FROM Name_Addr ;
WHERE CustID NOT IN (SELECT CustId FROM Purchase) ;
INTO CURSOR cNoSale
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform