Hey, I never said it was just a matter of replacing one word with another.
>Which confirms that you cannot just replace EXISTS with a JOIN
>
>>And?
>>
>>>With JOIN and DISTINCT also. But you have to add DISTINCT.
>>>
>>>
>>>>You just confirmed that it can be done with LEFT JOIN with DISTINCT.
>>>>
>>>>>
>>>>>Ok, There is a parent table and a child table. The child table contains a link to its parent
>>>>>
>>>>>
>>>>> create cursor parent ;
>>>>> ( p_id I, ;
>>>>> p_name c(32) ;
>>>>> )
>>>>>
>>>>> insert into parent values (1, 'Father Tom')
>>>>> insert into parent values (2, 'Father Mike')
>>>>>
>>>>> create cursor Child ;
>>>>> ( c_id I, ;
>>>>> c_p_id I, ;
>>>>> p_name c(30) ;
>>>>> )
>>>>>
>>>>> insert into Child values (1, 2, 'Daniel')
>>>>> insert into Child values (2, 2, 'David')
>>>>>
>>>>>
>>>>>I want to find the parents that have children
>>>>>
>>>>>
>>>>>(1) With exists
>>>>>
>>>>> select * ;
>>>>> from Parent ;
>>>>> where ( exists ;
>>>>> ( select 1 from Child where c_p_id == p_id ) ;
>>>>> ) ;
>>>>> into cursor ParentsWithChildren
>>>>>
>>>>>
>>>>>(2) How would you get the same result with JOIN or LEFT JOIN ? - no fiddling with DISTINCT