IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 15, 2012, 1:08:57 PM (14 years ago)
Author:
watersc1
Message:

The previous iteration on prioritizing science data over stare data did not work correctly. This version moves the ORDER BY dateobs statement into the elements of the union. I've also disabled the dateobs sorting that was done on the result of the union, as we no longer wish to do that (as it would undo the entire reason for the union).

File:
1 edited

Legend:

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

    r33366 r33533  
    11SELECT *
    22FROM (
    3     SELECT
     3    SELECT * FROM
     4    (SELECT
    45        summitImfile.*,
    56        summitExp.dateobs
     
    2021        AND pzDownloadImfile.class_id IS NULL
    2122        AND summitImfile.exp_name NOT LIKE '%a'
     23    ORDER BY dateobs) AS partA
    2224UNION
    23     SELECT
     25    SELECT * FROM
     26    (SELECT
    2427        summitImfile.*,
    2528        summitExp.dateobs
     
    4043        AND pzDownloadImfile.class_id IS NULL
    4144        AND summitImfile.exp_name LIKE '%a'
     45    ORDER BY dateobs) AS partB
    4246) as Foo
Note: See TracChangeset for help on using the changeset viewer.