Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pentuplicate rows in results
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 SP2
OS:
Windows XP SP2
Database:
Oracle
Divers
Thread ID:
01392142
Message ID:
01392150
Vues:
48
Terry,
JOIN act this way. If it see two or more values from one of the tables that match only one value from other the SELECT produces so many records as the max amount o fboth (I'm not sure If somebody understand that explanation, I didn't :o)))
That is why the example comes:
CREATE CURSOR crsTest1 (Fld1 int, Fld2 C(20))
INSERT INTO crsTest1 VALUES(1, 'Test1_1')

CREATE CURSOR crsTest2 (Fld1 int, Fld2 C(20))
INSERT INTO crsTest2 VALUES(1, 'Test2_1')
INSERT INTO crsTest2 VALUES(1, 'Test2_2')

SELECT * FROM crsTest1 INNER JOIN crsTest2 ON crsTest1.Fld1 = crsTest2.Fld1
And you will get a resultset with 2 records:
1 Test1_1 1 Test2_1
1 Test1_1 1 Test2_2
I am not sure what you want to do, but give the example data from both tables and what you want as a final result.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform