Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unsupported subselect type
Message
De
22/02/2008 15:30:05
 
 
À
22/02/2008 15:18:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01295494
Message ID:
01295497
Vues:
20
Suggestion follows:
*!* Your original SQL
select G.cStyle, G.kGarment, G.cDescrip, G.nDefPrice ;
  from Garments G ;
 where lkLoc in (select LG.kLoc from LocGarment LG ;
                  where LG.kGarment = G.kGarment   )

*!* Proposed Solution
SELECT G.cStyle, G.kGarment, G.cDescrip, G.nDefPrice ;
FROM Garments G ;
     JOIN LocGarment LG ON ;
          LocGarment.kLoc = Garments.lkLoc ;
What you're really doing is limiting Garments by a PK/FK 1:M relation in LocGarment. A simple INNER JOIN between the two will limit Garments to what is also in LocGarment. Am I seeing the problem-solution pair correctly here?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform