Thanks Michael and Isaac. We're just now upgrading from 8i to 10g, so I'm
still learning all the ansi standard outer join syntax.
-d


On 4/16/06, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
>
> > MYSQL VERSION
> > FROM  (fscd_county x JOIN fscd_client c ON (x.countyid =
> > c.countyid)
> >       JOIN fscd_state s on (s.stateid = x.stateid))
> >       LEFT OUTER JOIN fscd_survey u ON c.clientid =
> >       u.clientid
> >       LEFT OUTER JOIN fscd_post p ON c.clientid =
> >       p.clientid
> > WHERE  x.active = 1
> > AND    c.active = 1
> > AND    (p.active = 1 OR p.active is null)
> > AND    (u.active = 1 OR u.active is null) <!--- Is this
> > the preferred method
> > in Mysql? --->
>
> Hi Deanna, I just realized this message didn't seem to reach the list
> earlier.
>
> Have you tried this?
>
> FROM fscd_county x
> JOIN fscd_client c ON (x.countyid = c.countyid)
> JOIN fscd_state s on (s.stateid = x.stateid)
> LEFT JOIN fscd_survey u ON (c.clientid = u.clientid and p.active = 1)
> LEFT JOIN fscd_post p ON (c.clientid = p.clientid and u.active = 1)
> WHERE  x.active = 1
> AND    c.active = 1
>
> The extra set of parenthesis around the inner join statements would
> make me a little leery. Oracle 9i also added support for the standard
> outer join syntax shown here. Personally I also prefer to always
> include the parenthesis around the conditions of a join statement for
> clarity if nothing else.
>
>
> s. isaac dealey     434.293.6201
> new epoch : isn't it time for a change?
>
> add features without fixtures with
> the onTap open source framework
>
> http://www.fusiontap.com
> http://coldfusion.sys-con.com/author/4806Dealey.htm
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237894
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to