Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query Help part 1
Message
De
18/10/2004 14:41:13
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00952380
Message ID:
00952390
Vues:
8
>Have table1 with cust_no, field1, field2. table2 has cust_no, field3. want to create a table with table1 fields and table2.field3 if field3 > 5. Want to end up with the same number of record from table1.
>
>The WHERE field3 > 5 makes me lose records from table1.
>
>thanks
>
>Brenda


Brenda,

Try
SELECT Table1.Cust_No, Table1.Field1, Table1.Field2, Table2.Field3 ;
  FROM Table1 LEFT OUTER JOIN Table2 ;
    ON Table1.Cust_No = Table2.Cust_No ;
 WHERE Table2.Field3 > 5
Regards,
Jim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform