Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating cursor with two children from one parent
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01346532
Message ID:
01346548
Vues:
11
>Hi
>
>I'm trying to create a cursor from three tables
>
>LINEMARKINGHEAD (parent)
>CUSTOMERS (child) ICUSTNO
>SITES (child) CODE
>
>I want to extract all records from LINEMARKINGHEAD, but have the cursor contain the customer name and sitename. The line below works fine:-
>
>
>SELECT linemarkinghead.icustno,customers.ccompany FROM linemarkinghead,customers WHERE linemarkinghead.icustno=customers.icustno INTO CURSOR  listtmp
>
>
>but when I try to add the site I get far too many records:
>
>
>SELECT linemarkinghead.icustno,customers.ccompany,sites.name FROM linemarkinghead,customers,sites WHERE ;
>linemarkinghead.icustno=customers.icustno AND linemarkinghead.siteno=sites.code INTO CURSOR  tmp
>
>
>Can you not have two children in a SELECT SQL statement?

Give an example of the data and what you want as the output. If there are 2 customers for a given parent and only one site for that given parent .. what do you want to see.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform