Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select I need to understand
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01496256
Message ID:
01496257
Vues:
94
This message has been marked as the solution to the initial question of the thread.
The result is impossible for the query and data you posted.
Most likely there're multiple records with PK=230 in one of tables or both.

>
>I am having a tough time understanding why the following query returns 6 rows for the PK_FLD = 230? Here are the two tables:
>
>Table A
>PK_FLD ID_NAME
>230 ABC
>510 ABC
>511 ABC
>512 ABC
>
>TableB
>PK_FLD
>230
>510
>512
>511
>722
>
>
>select TABLEA.PK_FLD FROM TABLEA JOIN TABLEB ON TABLEA.PK_FLD = TABLEB.PK_FLD
>WHERE TABLEA.ID_NUMBER = "ABC"
>
>
>I thought that the resulting query should have 4 rows but what is returned is:
>230
>230
>230
>230
>230
>230
>510
>511
>512
>
>Could someone explain why? TIA
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform