O$: SQL Statement
Steve Finger
steve at srptech.com
Fri May 30 16:58:50 EDT 2008
Hi,
I guess I did read your requirement wrong. With out sub queries which
OmnisSQL doesn't support I don't think you can get this in one sql
statement. You will have to do two queries and compare the lists probably.
Sorry for mis-leading you.
Steve
Christine Penner wrote:
> I tried both of your examples. The first gives me the same results I got
> before. I get everything. The second gives me all Categories (with or
> without a contact) which is not what I want.
> Christine
>
> At 01:14 PM 30/05/2008, you wrote:
>> Hi Christine,
>>
>> Yes, that's why I think you need to reverse the join you have. I'm not
>> sure but I know I've done exactly what you are looking for if I
>> understand it correctly.
>>
>> SELECT * FROM CONTACTS, CONTACT_CAT
>> where ((CC_LM_SEQ=1) OR (CC_LM_SEQ=0))
>> and CC_CM_SEQ =* CM_SEQ_NO
>>
>> You say this doesn't give you what you want.
>>
>> Did you try:
>>
>> SELECT * FROM CONTACTS, CONTACT_CAT
>> where ((CC_LM_SEQ=1) OR (CC_LM_SEQ=0))
>> and CM_SEQ_NO =* CC_CM_SEQ
>>
>> If it still doesn't work I'm guessing there is something I'm not
>> understanding about the results you are looking for.
>>
>> According to my old Omnis73 manuals it says:
>>
>> *= this is a left outer join
>> =* this is a right outer join.
>>
>> Hope this helps
>>
>> Steve Finger
>>
More information about the omnisdev-en
mailing list