Re: Query problem!

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Feb 16 2003 - 13:13:20 EST

  • Next message: Andrus Adamchik: "Re: high-volume offline processing using cayenne?"

    Andrus Adamchik wrote:
    > Michael,
    >
    > Cayenne query translator indeed creates joins before the rest of the
    > qualifier parts. I still think that this is the correct behavior and the
    > fact that your other query worked is merely a coincedence.
    >
    > The the first part in your where clause, "(t0.GLOBAL = 'J')", would
    > still do a join internally, but thanks to DISTINCT it is not visible.
    >
    > To see what I mean by "coincedence", try deleting ALL rows from
    > tb_offer_usergroup_assoc table, and re-run your SQL.

    Correction. To demonstrate that joins are made with tables in the FROM
    clause no matter what you put in WHERE clause, you will need to delete
    data from all tables participating in the query except for tb_offers:

    tb_offer_usergroup_assoc
    tb_usergroup
    tb_usergroup_firm_assoc
    tb_firm

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Feb 16 2003 - 13:14:04 EST