https://projects.ecoinformatics.org/ecoinfo/https://projects.ecoinformatics.org/ecoinfo/ecoinfo/favicon.ico?14691340362007-02-13T01:49:12ZEcoinformatics RedmineInfoVeg - Bug #2772: DBA: doesn't read planted stems when calculating plots without datahttps://projects.ecoinformatics.org/ecoinfo/issues/2772?journal_id=95882007-02-13T01:49:12ZMichael Leemlee@nceas.ucsb.edu
<ul></ul><p>chk_lackdata_stems new SQL:</p>
<p>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]<br />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<br />GROUP BY observation.PROJECT_ID, entry_plots_stems.plotID, observation.authorObsCode, observation.cust_cvs_samplingLevel<br />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));</p> InfoVeg - Bug #2772: DBA: doesn't read planted stems when calculating plots without datahttps://projects.ecoinformatics.org/ecoinfo/issues/2772?journal_id=95892013-03-27T21:21:16ZRedmine Admin
<ul></ul><p>Original Bugzilla ID was 2772</p>