Changes

Jump to: navigation, search

Missing Date of Information

4,323 bytes added, 17:45, 10 November 2016
no edit summary
fieldreport.dateofreport IS NULL AND
hazardinfoversion.link_only = '0'
ORDER BY
InfoVerDate ASC,
`Form ID` ASC
</pre>
 
=== Accident===__NOEDITSECTION__
With this result set you can show the country which Accidents are affected and figure out a solution.
<pre>
SELECT
fieldreport.fieldreport_localid AS `Form ID`,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
imsmaenum.enumvalue AS `WB status`,
accidentinfoversion.dataentrydate AS InfoVerDate
FROM
fieldreport
Inner Join accidentinfoversion ON fieldreport.fieldreport_guid = accidentinfoversion.fieldreport_guid
INNER JOIN imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
fieldreport.dateofreport IS NULL AND
accidentinfoversion.link_only = '0'
ORDER BY
InfoVerDate ASC,
<pre>
SELECT
fieldreport.fieldreport_localidAS `Form ID`,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
hazreducinfoversion.startdatedataentrydate AS InfoVerDate,hazreducinfoversion.enddate,hazreducinfoversion.hazreduc_localid
FROM
fieldreport
Inner Join hazreducinfoversion ON fieldreport.fieldreport_guid = hazreducinfoversion.fieldreport_guid
INNER JOIN imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
fieldreport.dateofreport IS NULL AND
hazreducinfoversion.link_only = '0'
ORDER BY
fieldreport.fieldreport_localid InfoVerDate ASC,`Form ID` ASC
</pre>
=== AccidentLocation===__NOEDITSECTION__ <pre></pre>=== Victim===__NOEDITSECTION__ With this result set you can show the country which Loctions are affected and figure out a solution.
<pre>
SELECT
fieldreport.fieldreport_localid AS `Form ID`,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
imsmaenum.enumvalue AS `WB status`,
locationinfoversion.dataentrydate AS InfoVerDate
FROM
fieldreport
Inner Join locationinfoversion ON fieldreport.fieldreport_guid = locationinfoversion.fieldreport_guid
INNER JOIN imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
fieldreport.dateofreport IS NULL AND
locationinfoversion.link_only = '0'
ORDER BY
InfoVerDate ASC,
`Form ID` ASC
</pre>
 
=== MRE===__NOEDITSECTION__
With this result set you can show the country which MREs are affected and figure out a solution.
<pre>
SELECT
fieldreport.fieldreport_localid AS `Form ID`,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
imsmaenum.enumvalue AS `WB status`,
mreinfoversion.dataentrydate AS InfoVerDate
FROM
fieldreport
Inner Join mreinfoversion ON fieldreport.fieldreport_guid = mreinfoversion.fieldreport_guid
INNER JOIN imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
fieldreport.dateofreport IS NULL AND
mreinfoversion.link_only = '0'
ORDER BY
InfoVerDate ASC,
`Form ID` ASC
</pre>
 
=== QM===__NOEDITSECTION__
With this result set you can show the country which QMs are affected and figure out a solution.
<pre>
SELECT
fieldreport.fieldreport_localid AS `Form ID`,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
imsmaenum.enumvalue AS `WB status`,
qainfoversion.dataentrydate AS InfoVerDate
FROM
fieldreport
Inner Join qainfoversion ON fieldreport.fieldreport_guid = qainfoversion.fieldreport_guid
INNER JOIN imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
fieldreport.dateofreport IS NULL AND
qainfoversion.link_only = '0'
ORDER BY
InfoVerDate ASC,
`Form ID` ASC
</pre>
 === LocationVictim===__NOEDITSECTION__ With this result set you can show the country which Victims are affected and figure out a solution.
<pre>
SELECT
fieldreport.fieldreport_localid AS `Form ID`,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
imsmaenum.enumvalue AS `WB status`,
victiminfoversion.dataentrydate AS InfoVerDate
FROM
fieldreport
Inner Join victiminfoversion ON fieldreport.fieldreport_guid = victiminfoversion.fieldreport_guid
INNER JOIN imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
fieldreport.dateofreport IS NULL AND
victiminfoversion.link_only = '0'
ORDER BY
InfoVerDate ASC,
`Form ID` ASC
</pre>
Order by 2
</pre>
 
{{NavBox Upgrade}}
[[Category:NoPublic]]
[[Category:SQL Queries]]
6,632
edits

Navigation menu