Create a query for the x relationship. call it queryX
Create a query for the y relationship. call it queryY
Then create your product query and require that is have a
valid join
to queryX AND QueryY
You should get valid results where the product has entries in
both the
other queries.
On Sun, 22 Apr 2007 02:56:50 +0000 (UTC), "barbedwire103"
<webforumsuser@macromedia.com> wrote:
>How would i write this SQL statement?
>
> I have a table of products that i am trying to get. I
have another table that
>holds relations for various things. In my SQL i am trying
to get products that
>may have more than one relation in the second table. So,
for example, say i
>want to get product ID 1. In my where statement, i also
say ID 1 should have x
>relationship in the relations table AND y relation in the
same table.... I am
>able to get it to work if i leave the y relation out. I
am assuming that the
>SQL is treating these as two different records so it will
only display either
>the x relation or y relation.
>
> I need a work around and do not want use Unions as i
would then get two
>different results.
Bruce McKee
mm-help@phoenix-systems.com
For additional info on this, please send email to the
above addess.