Changeset 23617
- Timestamp:
- Mar 30, 2009, 2:55:06 PM (17 years ago)
- Location:
- trunk/ippTools/share
- Files:
-
- 4 edited
-
camtool_find_chip_id.sql (modified) (1 diff)
-
camtool_find_pendingexp.sql (modified) (1 diff)
-
camtool_find_pendingimfile.sql (modified) (1 diff)
-
camtool_find_processedexp.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/camtool_find_chip_id.sql
r20041 r23617 1 1 SELECT 2 * 3 FROM 4 (SELECT DISTINCT 5 chipRun.*, 6 rawExp.camera, 7 rawExp.telescope, 8 rawExp.dateobs, 9 rawExp.exp_tag, 10 rawExp.exp_type, 11 rawExp.filelevel, 12 rawExp.filter, 13 rawExp.airmass, 14 rawExp.ra, 15 rawExp.decl, 16 rawExp.exp_time, 17 rawExp.sat_pixel_frac, 18 rawExp.bg, 19 rawExp.bg_stdev, 20 rawExp.bg_mean_stdev, 21 rawExp.alt, 22 rawExp.az, 23 rawExp.ccd_temp, 24 rawExp.posang, 25 rawExp.object, 26 rawExp.sun_angle 27 FROM chipRun 28 JOIN rawExp 29 using(exp_id) 30 WHERE 31 chipRun.state = 'full') as Foo 2 chipRun.*, 3 rawExp.camera, 4 rawExp.telescope, 5 rawExp.dateobs, 6 rawExp.exp_tag, 7 rawExp.exp_type, 8 rawExp.filelevel, 9 rawExp.filter, 10 rawExp.airmass, 11 rawExp.ra, 12 rawExp.decl, 13 rawExp.exp_time, 14 rawExp.sat_pixel_frac, 15 rawExp.bg, 16 rawExp.bg_stdev, 17 rawExp.bg_mean_stdev, 18 rawExp.alt, 19 rawExp.az, 20 rawExp.ccd_temp, 21 rawExp.posang, 22 rawExp.object, 23 rawExp.sun_angle 24 FROM chipRun 25 JOIN rawExp 26 using(exp_id) 27 WHERE 28 chipRun.state = 'full' -
trunk/ippTools/share/camtool_find_pendingexp.sql
r19558 r23617 2 2 -- does a little more work then is necessary for -addprocessed but it seems 3 3 -- "cleaner" to use the same query for both cases 4 SELECT * FROM 5 (SELECT 6 camRun.*, 7 rawExp.exp_tag, 8 rawExp.exp_id, 9 rawExp.exp_name, 10 rawExp.camera, 11 rawExp.telescope, 12 rawExp.filelevel 13 FROM camRun 14 JOIN chipRun 15 USING(chip_id) 16 -- JOIN chipProcessedImfile 17 -- USING(chip_id) 18 JOIN rawExp 19 USING(exp_id) 20 -- ON chipProcessedImfile.exp_id = rawExp.exp_id 21 LEFT JOIN camProcessedExp 22 USING(cam_id) 23 LEFT JOIN camMask 24 ON camRun.label = camMask.label 25 WHERE 26 chipRun.state = 'full' 27 AND ((camRun.state = 'new' AND camProcessedExp.cam_id IS NULL) 28 OR camRun.state = 'update') 29 AND camMask.label IS NULL 30 ) as Foo 4 SELECT 5 camRun.*, 6 rawExp.exp_tag, 7 rawExp.exp_id, 8 rawExp.exp_name, 9 rawExp.camera, 10 rawExp.telescope, 11 rawExp.filelevel 12 FROM camRun 13 JOIN chipRun 14 USING(chip_id) 15 JOIN rawExp 16 USING(exp_id) 17 LEFT JOIN camProcessedExp 18 USING(cam_id) 19 LEFT JOIN camMask 20 ON camRun.label = camMask.label 21 WHERE 22 chipRun.state = 'full' 23 AND ((camRun.state = 'new' AND camProcessedExp.cam_id IS NULL) OR camRun.state = 'update') 24 AND camMask.label IS NULL -
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 1 SELECT 2 camRun.cam_id, 3 chipProcessedImfile.*, 4 rawExp.exp_name, 5 rawExp.camera, 6 rawExp.telescope, 7 rawExp.filelevel 8 FROM camRun 9 JOIN chipRun 10 USING (chip_id) 11 JOIN chipProcessedImfile 12 USING (chip_id) 13 JOIN rawExp 14 ON chipProcessedImfile.exp_id = rawExp.exp_id 15 LEFT JOIN camProcessedExp 16 USING(cam_id) 17 LEFT JOIN camMask 18 ON camRun.label = camMask.label 19 WHERE 20 camMask.label IS NULL -
trunk/ippTools/share/camtool_find_processedexp.sql
r23589 r23617 1 SELECT DISTINCT1 SELECT 2 2 camProcessedExp.*, 3 3 chipRun.chip_id,
Note:
See TracChangeset
for help on using the changeset viewer.
