IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12228


Ignore:
Timestamp:
Mar 5, 2007, 12:02:35 PM (19 years ago)
Author:
jhoblitt
Message:

nest query instead a subquery to make adding search criteria easier upstream
add additional information to the output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/camtool_find_pendingimfile.sql

    r12215 r12228  
    1 SELECT
    2     camPendingExp.cam_id,
    3     chipProcessedImfile.*,
    4     rawExp.exp_tag,
    5     rawExp.exp_id,
    6     rawExp.camera,
    7     rawExp.telescope,
    8     rawExp.workdir
    9 FROM camPendingExp
    10 JOIN chipProcessedExp
    11     USING(chip_id)
    12 JOIN chipProcessedImfile
    13     USING(chip_id)
    14 JOIN rawExp
    15     ON chipProcessedExp.exp_tag = rawExp.exp_tag
    16 LEFT JOIN camProcessedExp
    17     ON camPendingExp.cam_id = camProcessedExp.cam_id
    18 LEFT JOIN camMask
    19     ON camPendingExp.label = camMask.label
    20 WHERE
    21     camProcessedExp.cam_id IS NULL
    22     AND camMask.label IS NULL
     1SELECT * FROM
     2     -- the subselect is so where criteria can be specified without knowing
     3     -- which table the field came from
     4    (SELECT
     5        camPendingExp.*,
     6        chipProcessedExp.*,
     7        chipProcessedImfile.class_id,
     8        chipProcessedImfile.uri,
     9        chipProcessedImfile.bg,
     10        chipProcessedImfile.bg_stdev,
     11        chipProcessedImfile.bg_mean_stdev,
     12        chipProcessedImfile.path_base,
     13        rawExp.exp_id,
     14        rawExp.camera,
     15        rawExp.telescope
     16    FROM camPendingExp
     17    JOIN chipProcessedExp
     18        USING(chip_id)
     19    JOIN chipProcessedImfile
     20        USING(chip_id)
     21    JOIN rawExp
     22        ON chipProcessedExp.exp_tag = rawExp.exp_tag
     23    LEFT JOIN camProcessedExp
     24        ON camPendingExp.cam_id = camProcessedExp.cam_id
     25    LEFT JOIN camMask
     26        ON camPendingExp.label = camMask.label
     27    WHERE
     28        camProcessedExp.cam_id IS NULL
     29        AND camMask.label IS NULL) as foo
Note: See TracChangeset for help on using the changeset viewer.