Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL join with empty data in one table
Message
From
14/07/2000 16:17:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL join with empty data in one table
Miscellaneous
Thread ID:
00392660
Message ID:
00392660
Views:
38
Hello,
I need to make an SQL join of two tables, while data is missing in one of the two tables. Normally when I SELECT * FROM Table1 LEFT OUTER JOIN Table2 ON This=That , this is no problem, but in this case, I have in the WHERE clause something like:

SELECT * FROM Companies Co LEFT OUTER JOIN Sales Sa ON Co.keyvalue = Sa.keybedra WHERE Sa.Price > 0 INTO CURSOR BadResult

This results in a cursor that excludes all companies that have no corresponding records in the sales table, because of the Price>0 clause.
What can I do about this? Changing the cursor name into GoodResult doesn't help either.
Christian Isberner
Software Consultant
Next
Reply
Map
View

Click here to load this message in the networking platform