Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL-small problem but big solution
Message
De
03/06/2002 07:35:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/06/2002 05:09:07
Hisham Serry
Al-Bahar United Company
Kuwait, Kuwait
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00663969
Message ID:
00663983
Vues:
17
>Dear All,
>
>I have a small problem which will be a big solution for me, where I have a SQL statement not giving the right answer for what I need, I have table (a) and table (B) I need to show all records which in table (a) and the releated records in table (b) but the problem is giving me the opposite result it is giving table (b) what only releated in table (A) so I do not get the right answer, I wanted to have all the records in (a) and matching with records in (b) table, any idea ????
>
>thanks
>
>Hisham

Hisham,
You'd use an outer join. Using testdata.dbc customer and orders table SQL would look like (notice that not all customer's have an order) :

select * from customer a LEFT outer join orders b on a.cust_id = b.cust_id

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform