Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re: Ordering when using SQL
Message
De
26/12/1997 10:40:55
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Ordering when using SQL
Divers
Thread ID:
00067985
Message ID:
00067985
Vues:
45
I have three tables and I need to merge them in a way that (table A LEFT JOIN table B) UNION (table A LEFT JOIN table C). However, the result I got is kind of in reverse order like the following.

TABLE A: A1 A2
TABLE B: (A1,B1), (A1,B2), (A2,B1)
TABLE C: (A1,C1), (A2,C1), (A2,C2)

RESULT: (A1,B2,''), (A1,B1,''), (A2,B1,''), (A1,'',C1), (A2,'',C2), (A2,'',C1)

When I run the LEFT JOIN individually, the ordering is fine, but once I UNION them, the order reverses. There is no other key in the table that can identify the order except the recno(). Does anyone know how I can get the correct ordering in the view? Thanks.

Chu
Répondre
Fil
Voir

Click here to load this message in the networking platform