IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9708


Ignore:
Timestamp:
Oct 20, 2006, 6:01:12 PM (20 years ago)
Author:
jhoblitt
Message:

change -search to match against the new fields in detRun

File:
1 edited

Legend:

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

    r9467 r9708  
    6969    PS_ASSERT_PTR_NON_NULL(config, false);
    7070
    71 # define JOSH_SQL 0
    72 # if (JOSH_SQL)
    7371    psString query = psStringCopy(
    74         "SELECT"
    75         "   detNormalizedImfile.det_id,"
    76         "   detNormalizedImfile.iteration"
     72        "SELECT DISTINCT"
     73        "   detRunSummary.det_id,"
     74        "   detRunSummary.iteration"
    7775        " FROM detRun"
    78         " JOIN detInputExp"
    79         // can't join on the iteration here as we want the results from all
    80         // iterations
    81         "   ON detRun.det_id = detInputExp.det_id"
    82         " JOIN detNormalizedImfile"
    83         "   ON detInputExp.det_id = detNormalizedImfile.det_id"
    84         "   AND detInputExp.iteration = detNormalizedImfile.iteration"
    85         " JOIN rawDetrendExp"
    86         "   ON detInputExp.exp_tag = rawDetrendExp.exp_tag"
    8776        " JOIN detRunSummary"
    88         "   ON detInputExp.det_id = detRunSummary.det_id"
    89         "   AND detInputExp.iteration = detRunSummary.iteration"
     77        "   USING(det_id)"
    9078        " WHERE"
    9179        "   detRun.state = 'stop'"
    9280        "   AND detRunSummary.accept = 1"
    9381    );
    94 # else
     82# if 0
    9583    psString query = psStringCopy(
    9684        "SELECT DISTINCT"
     
    122110
    123111    if (config->where) {
    124         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "rawDetrendExp");
     112        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "detRun");
    125113        psStringAppend(&query, " AND %s", whereClause);
    126114        psFree(whereClause);
Note: See TracChangeset for help on using the changeset viewer.