Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing a SQL to avoid using a UNION
Message
 
 
À
13/08/2001 13:02:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00543106
Message ID:
00543114
Vues:
14
This message has been marked as the solution to the initial question of the thread.
SELECT MainTable.Numero FROM MainTable ;
 WHERE MainTable.IGroupe=0 OR MainTable.IGroupe IN ( ;
     SELECT ChildTable.IGroupe FROM ChildTable WHERE ChildTable.No_Membre=7)
>I have a SQL where I am using a UNION. I would like to know if there would be a way to obtain the same without using the UNION.
>
>The SQL is like this:
>
>
>SELECT MainTable.Numero FROM MainTable INNER JOIN ChildTable;
> ON MainTable.IGroupe=ChildTable.IGroupe WHERE ChildTable.No_Membre=7;
> UNION;
>SELECT MainTable.Numero FROM MainTable WHERE MainTable.IGroupe=0
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform