Changeset 27679
- Timestamp:
- Apr 14, 2010, 11:54:15 AM (16 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 2 edited
-
share/stacktool_tosum.sql (modified) (2 diffs)
-
src/stacktool.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/stacktool_tosum.sql
r24601 r27679 1 SELECT DISTINCT1 SELECT 2 2 stackRun.stack_id, 3 3 stackRun.tess_id, … … 8 8 stackRun.state 9 9 FROM stackRun 10 JOIN stackInputSkyfile 11 USING(stack_id) 12 LEFT JOIN stackSumSkyfile 13 USING(stack_id) 10 JOIN stackInputSkyfile USING(stack_id) 11 JOIN warpRun USING(warp_id) 12 LEFT JOIN stackSumSkyfile USING(stack_id) 14 13 WHERE 15 14 ((stackRun.state = 'new' AND stackSumSkyfile.stack_id IS NULL) 16 15 OR (stackRun.state = 'update' AND stackSumSkyfile.fault = 0 AND stackSumSkyfile.quality = 0)) 16 -- WHERE hook %s 17 GROUP BY stack_id 18 HAVING COUNT(warpRun.state = 'full') = COUNT(stackInputSkyfile.warp_id) -
trunk/ippTools/src/stacktool.c
r27678 r27679 753 753 } 754 754 755 psString whereClause = psStringCopy(""); // WHERE conditions to add 755 756 if (psListLength(where->list)) { 756 psString whereClause= psDBGenerateWhereConditionSQL(where, NULL);757 psStringAppend(& query, " AND %s", whereClause);758 psFree( whereClause);757 psString new = psDBGenerateWhereConditionSQL(where, NULL); 758 psStringAppend(&whereClause, "\nAND %s", new); 759 psFree(new); 759 760 } 760 761 psFree(where); … … 767 768 } 768 769 769 if (!p_psDBRunQuery (config->dbh, query)) {770 if (!p_psDBRunQueryF(config->dbh, query, whereClause)) { 770 771 psError(PS_ERR_UNKNOWN, false, "database error"); 771 772 psFree(query);
Note:
See TracChangeset
for help on using the changeset viewer.
