Project

General

Profile

Actions

Bug #2772

closed

DBA: doesn't read planted stems when calculating plots without data

Added by Michael Lee almost 18 years ago. Updated almost 18 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
EntryDB
Target version:
Start date:
02/12/2007
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2772

Description

plots without data need ot really have no data: no planted and no natural stems.

Actions #1

Updated by Michael Lee almost 18 years ago

chk_lackdata_stems new SQL:

SELECT observation.PROJECT_ID, entry_plots_stems.plotID, observation.authorObsCode AS Plot, observation.cust_cvs_samplingLevel AS [level], Count(entry_stems.plotID) AS [total Records], Sum(([IsIndividualRecord]=False)*-1) AS [Count Natural Stem Records], Sum(([IsIndividualRecord]=True)*-1) AS [Count Of Planted Stem Records]
FROM (observation LEFT JOIN entry_plots_stems ON observation.OBSERVATION_ID = entry_plots_stems.plotID) LEFT JOIN entry_stems ON entry_plots_stems.plotID = entry_stems.plotID
GROUP BY observation.PROJECT_ID, entry_plots_stems.plotID, observation.authorObsCode, observation.cust_cvs_samplingLevel
HAVING (((Count(entry_stems.plotID))=0)) OR (((observation.cust_cvs_samplingLevel)=1) AND ((Sum(([IsIndividualRecord]=True)*-1)) Is Null Or (Sum(([IsIndividualRecord]=True)*-1))=0)) OR (((observation.cust_cvs_samplingLevel)=3 Or (observation.cust_cvs_samplingLevel)=4 Or (observation.cust_cvs_samplingLevel)=5) AND ((Sum(([IsIndividualRecord]=False)*-1)) Is Null Or (Sum(([IsIndividualRecord]=False)*-1))=0)) OR (((observation.cust_cvs_samplingLevel)=2) AND ((Sum(([IsIndividualRecord]=False)*-1)) Is Null Or (Sum(([IsIndividualRecord]=False)*-1))=0) AND ((Sum(([IsIndividualRecord]=True)*-1)) Is Null Or (Sum(([IsIndividualRecord]=True)*-1))=0));

Actions #2

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 2772

Actions

Also available in: Atom PDF