Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql select
Message
De
12/08/2005 11:27:31
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01040398
Message ID:
01040571
Vues:
15
Got it!

Thanks

>You can do it in two steps
* Get parent records into the cursor
>SELECT * FROM ParentTable ;
>  WHERE &lcFilter ;
>  INTO CURSOR crsParent
>* Now join a cursor with child table
>SELECT ...
>
>
>>If I have a parent/child relationship established and the parent table is filtered via set filter to . . . .
>>
>>I want to use SQL SELECT to create a cursor from both tables containing only the records that are consistant with the filter established in the parent table, the following code seems to work . . .
>>
>>lcFilter = filter()
>>
>>SELECT FROM etc etc
>>WHERE &lcFilter ;
>>etc etc
>>
>>There are however 2 problems. The first of these is that if the filter condition references a field that is contained in both tables, such as the join field, it will crash. Prefacing the field with the alias when the original filter is created corrects this but getting my user to do this will be difficult.
><snip>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform