IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2009, 2:55:06 PM (17 years ago)
Author:
eugene
Message:

fix pxcamGet/SetSearchArgs usage: need to be careful of queries that used nested subqueries to hide the table

File:
1 edited

Legend:

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

    r19972 r23617  
    1 SELECT DISTINCT * FROM
    2      -- the subselect is so where criteria can be specified without knowing
    3      -- which table the field came from
    4     (SELECT
    5         camRun.cam_id,
    6         chipProcessedImfile.*,
    7         rawExp.exp_name,
    8         rawExp.camera,
    9         rawExp.telescope,
    10         rawExp.filelevel
    11     FROM camRun
    12     JOIN chipRun
    13 --      ON camRun.chip_id = chipRun.chip_id
    14         USING (chip_id)
    15     JOIN chipProcessedImfile
    16 --      ON camRun.chip_id = chipProcessedImfile.chip_id
    17         USING (chip_id)
    18     JOIN rawExp
    19       ON chipProcessedImfile.exp_id = rawExp.exp_id
    20     LEFT JOIN camProcessedExp
    21         USING(cam_id)
    22     LEFT JOIN camMask
    23         ON camRun.label = camMask.label
    24     WHERE
    25         camMask.label IS NULL) as foo
     1SELECT
     2    camRun.cam_id,
     3    chipProcessedImfile.*,
     4    rawExp.exp_name,
     5    rawExp.camera,
     6    rawExp.telescope,
     7    rawExp.filelevel
     8FROM camRun
     9JOIN chipRun
     10    USING (chip_id)
     11JOIN chipProcessedImfile
     12    USING (chip_id)
     13JOIN rawExp
     14  ON chipProcessedImfile.exp_id = rawExp.exp_id
     15LEFT JOIN camProcessedExp
     16    USING(cam_id)
     17LEFT JOIN camMask
     18    ON camRun.label = camMask.label
     19WHERE
     20    camMask.label IS NULL
Note: See TracChangeset for help on using the changeset viewer.