IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36964


Ignore:
Timestamp:
Jul 2, 2014, 3:23:59 PM (12 years ago)
Author:
watersc1
Message:

sql bug fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-pv3-20140616/ippTools/share/remotetool_definebyquery_warp.sql

    r36853 r36964  
    1 SELECT
    2        warp_id AS stage_id
    3 FROM warpRun
    4        LEFT JOIN remoteComponent ON (remoteComponent.stage_id = warpRun.warp_id)
    5        LEFT JOIN remoteRun ON (
    6             remoteComponent.remote_id = remoteRun.remote_id AND
    7             remoteRun.label = warpRun.label
    8             )
    9 WHERE
    10 warpRun.state = 'new' AND
    11 (remoteRun.stage = 'warp' OR remoteRun.state IS NULL) AND
    12 remoteComponent.remote_id IS NULL
     1SELECT warp_id AS stage_id FROM (
     2SELECT warp_id, count(warpSkyCellMap.skycell_id) AS N
     3    FROM warpRun
     4    LEFT JOIN warpSkyCellMap USING(warp_id)
     5    LEFT JOIN remoteComponent ON (remoteComponent.stage_id = warpRun.warp_id)
     6    LEFT JOIN remoteRun ON (remoteComponent.remote_id = remoteRun.remote_id
     7                        AND remoteRun.label = warpRun.label             
     8                        AND (remoteRun.stage = 'warp' OR remoteRun.state IS NULL)
     9                        )
     10WHERE warpRun.state = 'new'
     11AND (remoteRun.stage = 'warp' OR remoteRun.state IS NULL)
     12-- AND remoteComponent.remote_id IS NULL
     13-- where hook %s
     14GROUP BY warp_id
     15) AS warpTry
     16WHERE N != 0
     17
Note: See TracChangeset for help on using the changeset viewer.