Expression help with one-to-many relationship

From: Jeff de Vries (jdevrie..frog.com)
Date: Wed Nov 02 2005 - 19:29:16 EST

  • Next message: Jeff de Vries: "Re: Expression help with one-to-many relationship"

    Assume I have the following tables:

    create table parent (
       id int primary key,
       ... stuff
    )

    create table child (
       parent_id int foreign key references parent(id),
       ... stuff
    )

    I need to find all the *parent* objects such that they have at least one
    *child* object that meets some given set of conditions. I can live with
    if a parent that has more than one child with the condition gets listed
    multiple times, but ideally each parent would only show up once.

    Sorry if this is some really basic SQL thing ...

    Jeff de Vries



    This archive was generated by hypermail 2.0.0 : Wed Nov 02 2005 - 19:29:15 EST