Missing approval information PGSQL
| will add more queries. |

How it should NOT look like
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 = Approved are included.
Missing approval information
SELECT "public".fieldreport.fieldreport_localid AS "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", workbench_status.enumvalue FROM fieldreport Inner Join imsmaenum AS workbench_status ON (workbench_status.imsmaenum_guid = fieldreport.workbenchstatusenum_guid) WHERE workbench_status.enumvalue = 'Approved' AND (fieldreport.reportverifieddate IS NULL OR fieldreport.verifiedby IS NULL ) ORDER BY "Form ID" ASC
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.