IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9440


Ignore:
Timestamp:
Oct 9, 2006, 3:37:23 PM (20 years ago)
Author:
jhoblitt
Message:

more SQL fiddling

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/detselect.c

    r9431 r9440  
    102102        // "   detRunSummary.accept,"
    103103        // "   rawDetrendExp.camera"
    104         "  FROM detRun"
    105         "  JOIN detRunSummary "
    106         "    ON detRun.det_id = detRunSummary.det_id"
    107         "  JOIN detInputExp"
    108         "    ON detRunSummary.det_id = detInputExp.det_id"
    109         "   AND detRunSummary.iteration = detInputExp.iteration"
    110         "  JOIN rawImfile"
    111         "    ON detInputExp.exp_tag = rawImfile.exp_tag"
    112         "  JOIN rawDetrendExp"
    113         "    ON detInputExp.exp_tag = rawDetrendExp.exp_tag"
    114         " WHERE detRun.state = 'stop'"
    115         "   AND detRunSummary.accept = 1"
    116         // XXX the following entry is needed to exclude db mismatched
    117         // XXX these are caused by an error upstream and should be fixed
    118         "   AND detRun.det_type = rawDetrendExp.object"
     104        " FROM detRun"
     105        " JOIN detRunSummary "
     106        "   USING(det_id)"
     107        " JOIN detInputExp"
     108        "   ON detRunSummary.det_id = detInputExp.det_id"
     109        "   AND detRunSummary.iteration = detInputExp.iteration"
     110        " JOIN rawDetrendExp"
     111        "   ON detInputExp.exp_tag = rawDetrendExp.exp_tag"
     112        " JOIN rawImfile"
     113        "   ON rawDetrendExp.exp_tag = rawImfile.exp_tag"
     114        " WHERE"
     115        "   detRun.state = 'stop'"
     116        "   AND detRunSummary.accept = 1"
     117        // XXX the following entry is needed to exclude db mismatched
     118        // XXX these are caused by an error upstream and should be fixed
     119//        "   AND detRun.det_type = rawDetrendExp.object"
    119120    );
    120121# endif
     
    186187        " FROM detNormalizedImfile"
    187188        " JOIN detRun"
    188         "   ON detNormalizedImfile.det_id = detRun.det_id"
     189        "   USING(det_id)"
    189190        " JOIN detRunSummary"
    190191        "   ON detNormalizedImfile.det_id = detRunSummary.det_id"
  • trunk/ippTools/src/dettool.c

    r9429 r9440  
    146146    PS_ASSERT_PTR_NON_NULL(config, NULL);
    147147
    148      psString query = psStringCopy("SELECT rawDetrendExp.* FROM rawDetrendExp"
    149         " LEFT JOIN detInputExp ON rawDetrendExp.exp_tag = detInputExp.exp_tag"
    150         " WHERE detInputExp.exp_tag IS NULL");
     148     psString query = psStringCopy(
     149        "SELECT"
     150        "   rawDetrendExp.*"
     151        " FROM rawDetrendExp"
     152        " LEFT JOIN detInputExp"
     153        "   ON rawDetrendExp.exp_tag = detInputExp.exp_tag"
     154        " WHERE"
     155        "    detInputExp.exp_tag IS NULL"
     156    );
    151157
    152158    if (config->where) {
Note: See TracChangeset for help on using the changeset viewer.