Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Summing by location
Message
 
 
To
27/07/1999 10:51:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00246115
Message ID:
00246638
Views:
16
Actually, I understand what you're saying, but if I'm getting SQL correct on a join the circles aren't always parent on left, child on right, instead, a left join says that parent is on left, a right join says that the parent is on right...but I tried both right and left joins and I still don't get what I'm looking for:(


>Set theory (I'm not strong on it) but visualize your data as sets of dots with circles around them. The two circles overlap. On the left side is your master table, on the right side is your child table. A right join says, "Give me every child, matching parent where you can, and provide blank partents where you can't match" a left join says, "Give me every master and matching every child where you can, and giving me blank children where you can't match"
>
>Maybe I didn't read the problem correctly, but I think you need a left join.
>

>>>>Here again is the statement I have thus far:
>>>>
SELECT INMAST.FPARTNO, INONHD.FONHND ;
>>>>	FROM INONHD RIGHT JOIN INMAST;
>>>>	ON INONHD.FPARTNO=INMAST.FPARTNO;
>>>>	WHERE &LCWHERE;
>>>>	INTO CURSOR TMP1
>>>>LCWHERE is concatenated according to other conditions within the form...is there a way to put like an IIF() like this?
>>>>
SELECT INMAST.FPARTNO,IIF(EMPTY(INONHD.FONHND),'0' AS FONHND,INONHD.FONHND)...
>>>>I've tried the above and it keeps giving me an error when the SQL is executed that it needs a )....got any ideas?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform