Missing Local ID: Difference between revisions

From IMSMA Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
fieldreport.fieldreport_localid is null
fieldreport.fieldreport_localid is null
</pre>
</pre>
 
'''Accident'''
SELECT
accident.accident_localid,
accidentinfoversion.accident_localid
FROM
accident
Inner Join accidentinfoversion ON accident.accident_guid = accidentinfoversion.accident_guid
WHERE
(accident.accident_localid IS NULL  OR
accidentinfoversion.accident_localid IS NULL)  AND
accidentinfoversion.link_only =  '0'
</pre>
[[Category:NoPublic]]
[[Category:NoPublic]]
[[Category:SQL Queries]]
[[Category:SQL Queries]]

Revision as of 07:43, 12 February 2014

Field report

SELECT
fieldreport.fieldreport_localid,
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`
FROM
fieldreport
WHERE
fieldreport.fieldreport_localid is null

Accident SELECT accident.accident_localid, accidentinfoversion.accident_localid FROM accident Inner Join accidentinfoversion ON accident.accident_guid = accidentinfoversion.accident_guid WHERE (accident.accident_localid IS NULL OR accidentinfoversion.accident_localid IS NULL) AND accidentinfoversion.link_only = '0'