join question

Charles Yeomans yeomans at desuetude.com
Sat Jun 28 13:01:41 CDT 2003


On Friday, June 27, 2003, at 09:36 PM, Stephan Huber wrote:

>
>
> --On Freitag, 27. Juni 2003 18:38 Uhr -0400 Charles Yeomans 
> <yeomans at desuetude.com> wrote:
>
>> Is this now possible in Valentina, and, if so, how?
>
> I hope I understood your problem correcty:
>
> select table1.* from table1, jointable where 
> (jointable.objectptrtotable2 = 1) or (jointable.objectptrtotable2 = 2)
>
> Is this what you want?


No; what I need is to to return all records of Table1 that are related 
to records in Table2 satisfying both conditions.  Let me give a more 
concrete example.  Suppose I have tables Teachers and Students, plus a 
many-many relation between them expressed in a join table.  Given two 
students, I want to find all teachers that have both students in a 
class.

Charles Yeomans



More information about the Valentina mailing list