[V4RB] Need a bit of help with Many to Many relationship

Kevin Windham kevo at gatorgraphics.com
Thu Feb 6 11:31:13 CST 2003


On Thursday, February 6, 2003, at 11:17  AM, Ruslan Zasukhin wrote:

>
>     SELECT T1.RecID
>     FROM T1, T12, T2
>     WHERE T2.RecID = 548
>
> Here 548 -- is example value of that specific record.
>
> But in fact, FOR THIS TASK you can do this in simpler way.
> The middle table has all needed info for this.
>
>     SELECT DISTINCT T12.ptr1
>     FROM T12
>     WHERE T12.ptr2 = 548
>

Thanks Ruslan. I should have recognized the second query, but I guess 
the example had me thinking about the linking conditions. Sometimes 
it's hard to turn once you've started moving in a direction.

Kevin



More information about the Valentina mailing list