Changes

Jump to: navigation, search

Missing Local ID

786 bytes added, 00:46, 12 November 2016
no edit summary
{{Note | All ID are important to be filled in. ''Form ID'' is important for the DEF's Reconcilation tab and I recommend that to update that one as the last one.}}
==Missing Local ID items items ==__NOEDITSECTION__
[[Image:Missing local id.png|475px|center]]
<div align="center">
Start with checking the items and the infoversions. If they are missing a local ID then I strongly recommend to set one which will be very helpful if you need to populate ''Form ID''.
=== Missing ID - Accident ===__NOEDITSECTION__
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
</pre>
=== Missing ID - Hazard ===__NOEDITSECTION__
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
</pre>
=== Missing ID - Hazard Reduction ===__NOEDITSECTION__
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
</pre>
=== Missing ID - Location ===__NOEDITSECTION__
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
</pre>
=== Missing ID - MRE ===__NOEDITSECTION__
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
</pre>
=== Missing ID - QM ===__NOEDITSECTION__
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
</pre>
=== Missing ID - Victim ===__NOEDITSECTION__
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
</pre>
=== Missing Local ID items - Example update query ===__NOEDITSECTION__
<pre>
update hazardinfoversion
== Missing Local ID fieldreport ==__NOEDITSECTION__
[[Image:Missing local id2.png|900px|center]]
<div align="center">
'' How it should NOT look like''
</div>
 
If you get output here you '''NEED''' to take action. The easiest solution to populate the ''Form ID'' for DEF is to use the local ID from the infoversion which you have now populated with updating the ones that were missing with the queries above.
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,imsmaenum.enumvalue,fieldreportdesc.fieldreportname
FROM
fieldreport
Inner Join imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
Inner Join fieldreportdesc ON fieldreport.fieldreportdesc_guid = fieldreportdesc.fieldreportdesc_guid
WHERE
fieldreport.fieldreport_localid is null IS NULL or length(trim(fieldreport.fieldreport_localid)) = 0ORDER BYimsmaenum.enumvalue ASC,fieldreportdesc.fieldreportname 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 updatedand if you have any data that you could use.
=== Missing ID fieldreport - Accident ===__NOEDITSECTION__
<pre>
SELECT
</pre>
=== Missing ID fieldreport - Hazard ===__NOEDITSECTION__
<pre>
SELECT
</pre>
=== Missing ID fieldreport - Hazard Reduction ===__NOEDITSECTION__
<pre>
SELECT
</pre>
=== Missing ID fieldreport - Location ===__NOEDITSECTION__
<pre>
SELECT
</pre>
=== Missing ID fieldreport - MRE ===__NOEDITSECTION__
<pre>
SELECT
</pre>
=== Missing ID fieldreport - QM ===__NOEDITSECTION__
<pre>
SELECT
</pre>
=== Missing ID fieldreport - Victim ===__NOEDITSECTION__
<pre>
SELECT
</pre>
=== Missing ID fieldreport - Example update query ===__NOEDITSECTION__ [[Image:Missing local id3.png|875px|center]] 
<pre>
update fieldreport
work_item.localid IS NULL OR length(trim(work_item.localid)) = 0
</pre>
=== Example update query ===__NOEDITSECTION__
 
{{NavBox Upgrade}}
[[Category:NoPublic]]
[[Category:SQL Queries]]
6,632
edits

Navigation menu