Changes

Missing approval information PGSQL

674 bytes added, 00:37, 14 November 2016
no edit summary
{{Under construction | still MySQL will add more queries.}}{{TOC right}}[[Image:Missing approval info.png|800px|center]]<div align="center">'' How it should NOT look like''</div>Depending on the reason why the approval information is missing there are different combinations:* only Approval date missing* only Approved by missing* both missing. The solution is of course depending on what is missing. It is '''important''' that the approval information is set. and '''only'' rows with workbench status = '''NOTEApproved''' How to fix it is different for each country are included.  ==Missing approval information ==__NOEDITSECTION__
<pre>
SELECT
"public".fieldreport.fieldreport_localidAS "Form ID","public".fieldreport.dateofreport AS `"Date of Information`","public".fieldreport.reportreceiveddate AS `"Data Entry Date`","public".fieldreport.reportcompleteddate AS `"Submitted Date`","public".fieldreport.reportverifieddate AS `"Approved Date`","public".fieldreport.verifiedby AS "Approved by","public".fieldreport.dataenterer AS `"Data enterer`",fieldreportworkbench_status.verifiedby AS `Approved by`enumvalue
FROM
fieldreport
fieldreport.verifiedby IS NULL )
ORDER BY
fieldreport.fieldreport_localid "Form ID" ASC
</pre>
 
If you have any output here you need to take action. The queries below help you to identify for which item(s) the rows in the table ''fieldreport'' need to be updated.
 
{{NavBox Hub}}
 
[[Category:NoPublic]]
[[Category:SQL Queries]]
6,632
edits