joins

From: Eric Polino (eri..ampgroundautomation.com)
Date: Thu May 22 2008 - 17:23:25 EDT

  • Next message: Eric Polino: "Re: joins"

    Given three tables (This is not accurate SQL syntax...but you get the point).

    Reservation {
      ...
      siteId int foreign key with Site,
      ...
    }

    Site {
      ...
      siteId int primary key,
      typeId int foreign key with SiteType,
      ...
    }

    SiteType {
      ...
      siteTypeId int primary key,
      name varchar(32),
      ...
    }

    How can I do the following SQL statement using Expression,
    ExpressionFactory, SelectQuery, etc?

    select * from Reservation r, Site s, SiteType st where r.siteId =
    s.siteId and s.typeId = st.siteTypeId and st.name = 'foo'

    TIA.

    -- 
    Eric Polino
    Campground Automated Systems
    



    This archive was generated by hypermail 2.0.0 : Thu May 22 2008 - 17:24:00 EDT