SQL Saved search No geo data

From IMSMA Wiki
Revision as of 07:52, 13 February 2014 by Alnaucler (talk | contribs)
Jump to navigation Jump to search

These queries finds records without any geographical information. They are added to V6.0 as Saved searches with a syntax that works as Saved search. Note: These queries are in 5.x format
Accident

SELECT
accident.accident_localid
FROM
accident
WHERE
accident.hasgeodata =  '0'
ORDER BY
accident.accident_localid ASC

Hazard

SELECT
hazard.hazard_localid
FROM
hazard
WHERE
hazard.hasgeodata =  '0'
ORDER BY
hazard.hazard_localid ASC

HazRed

SELECT
hazreduc.hazreduc_localid
FROM
hazreduc
WHERE
hazreduc.hasgeodata =  '0'
ORDER BY
hazreduc.hazreduc_localid ASC

Location

SELECT
location.location_localid
FROM
location
WHERE
location.hasgeodata =  '0'
ORDER BY
location.location_localid ASC

MRE

SELECT
mre.mre_localid
FROM
mre
WHERE
mre.hasgeodata =  '0'
ORDER BY
mre.mre_localid ASC

QA

SELECT
qa.qa_localid
FROM
qa
WHERE
qa.hasgeodata =  '0'
ORDER BY
qa.qa_localid ASC

Task (not a Saved search)

SELECT
task.localid
FROM
task
WHERE
task.hasgeodata =  '0'
ORDER BY
task.localid ASC

Victim

SELECT
victim.victim_localid
FROM
victim
WHERE
victim.hasgeodata =  '0'
ORDER BY
victim.victim_localid ASC