Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining SQL syntax
Message
De
18/10/2001 10:33:41
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00569838
Message ID:
00570244
Vues:
21
Yuri,

I am trying to get away from intermediate cursors. Also, the view designer can't handle more than two tables.

Thanks

Rex

>I believe, yes, it is possible. However it may depend on the specific john conditions you need. Perhaps you can do it without unsertaincies in two-three steps preparing intermediate cursors to get the final cursor.
>
>Also you can use the Query/View designer, that suppose to do the 'dirty' code work for you. See "Querying Multiple Tables and Views" in VFP6 Help for more details.
>
>>Yuri,
>>
>>What I really need is to use Syntax 2 for LEFT and RIGHT JOINs, but be able to join over 10 tables from Syntax 1.
>>
>>Is this possible?
>>
>>TIA
>>
>>Rex
>>
>>>In some cases you can use UNION to achieve result similar to JOHN.
>>>
>>>>All,
>>>>
>>>>When creating SQL code in VFP, you can use one of two syntaxes:
>>>>
>>>>
>>>>Syntax 1.:
>>>>   SELECT ;
>>>>      Table1.Field2,;
>>>>      Table2.Field3 ;
>>>>    FROM ;
>>>>      Table1,;
>>>>      Table2 ;
>>>>    WHERE ;
>>>>      Table1.Field1 = Table2.Field2 ;
>>>>    INTO CURSOR SQLType1
>>>>
>>>>Syntax 2.
>>>>   SELECT ;
>>>>      Table1.Field2,;
>>>>      Table2.Field3 ;
>>>>    FROM ;
>>>>      Table1 ;
>>>>    INNER JOIN Table2 ;
>>>>      ON Table1.Field1 = Table2.Field2 ;
>>>>    INTO CURSOR SQLType1
>>>>
>>>>
>>>>Type 1 allows the user to combine many more tables then Type2, but Type 2 allows the user to easily join tables in various ways (LEFT JOIN, RIGHT JOIN, FULL JOIN etc).
>>>>
>>>>Is there a way to combine the two syntaxes?
>>>>TIA
>>>>
>>>>Rex
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform