>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.
Try:
SELECT * ;
FROM Companies Co ;
LEFT OUTER JOIN Sales Sa ;
ON Co.KeyValue = Sa.keyBedra AND ;
Sa.Price > 0 ;
INTO CURSOR GoodResult