Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL-small problem but big solution
Message
From
03/06/2002 07:35:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/06/2002 05:09:07
Hisham Serry
Al-Bahar United Company
Kuwait, Kuwait
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00663969
Message ID:
00663983
Views:
16
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform