SQL Saved search Duplicate ID: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
These queries finds duplicates on ID. They are added to V6.0 as Saved searches with a syntax that works as Saved search | These queries finds duplicates on ID. They are added to V6.0 as Saved searches with a syntax that works as Saved search </br> | ||
'''Accident''' | '''Accident ID''' | ||
<pre> | <pre> | ||
SELECT | SELECT | ||
| Line 12: | Line 12: | ||
Count(accident.accident_guid) > '1' | Count(accident.accident_guid) > '1' | ||
</pre> | </pre> | ||
'''Hazard''' | '''Hazard ID''' | ||
<pre> | <pre> | ||
SELECT | SELECT | ||
| Line 24: | Line 24: | ||
Count(hazard.hazard_guid) > '1' | Count(hazard.hazard_guid) > '1' | ||
</pre> | </pre> | ||
'''HazRed ID''' | |||
<pre> | |||
SELECT | |||
hazreduc.hazreduc_localid, | |||
Count(hazreduc.hazreduc_guid) | |||
FROM | |||
hazreduc | |||
GROUP BY | |||
hazreduc.hazreduc_localid | |||
HAVING | |||
Count(hazreduc.hazreduc_guid) > '1' | |||
</pre> | |||
'''Location ID''' | |||
<pre> | |||
</pre> | |||
[[Category:NoPublic]] | [[Category:NoPublic]] | ||
[[Category:SQL Queries]] | [[Category:SQL Queries]] | ||
Revision as of 06:05, 13 February 2014
These queries finds duplicates on ID. They are added to V6.0 as Saved searches with a syntax that works as Saved search
Accident ID
SELECT accident.accident_localid, Count(accident.accident_guid) FROM accident GROUP BY accident.accident_localid HAVING Count(accident.accident_guid) > '1'
Hazard ID
SELECT hazard.hazard_localid, Count(hazard.hazard_guid) FROM hazard GROUP BY hazard.hazard_localid HAVING Count(hazard.hazard_guid) > '1'
HazRed ID
SELECT hazreduc.hazreduc_localid, Count(hazreduc.hazreduc_guid) FROM hazreduc GROUP BY hazreduc.hazreduc_localid HAVING Count(hazreduc.hazreduc_guid) > '1'
Location ID