MGRS coordinates: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
This query finds MGRS coordinates with the incorrect format of type | This query finds MGRS coordinates with the incorrect format of type ''4qfj12345678''. | ||
<pre> | <pre> | ||
| Line 14: | Line 14: | ||
Note: This query is in 5.x format | Note: This query is in 5.x format | ||
This query finds MGRS coordinates with blanks | This query finds MGRS coordinates with blanks ''4 QFJ 1234 5678''. | ||
<pre> | <pre> | ||
| Line 25: | Line 25: | ||
ORDER BY | ORDER BY | ||
userenteredcoord ASC | userenteredcoord ASC | ||
</pre> | |||
Note: This query is in 5.x format | Note: This query is in 5.x format | ||
[[Category:NoPublic]] | [[Category:NoPublic]] | ||
[[Category:SQL Queries]] | [[Category:SQL Queries]] | ||
Revision as of 11:06, 12 February 2014
This query finds MGRS coordinates with the incorrect format of type 4qfj12345678.
SELECT geopoint.userenteredcoord,
concat( upper(left(geopoint.userenteredcoord, locate('|', geopoint.userenteredcoord) -1)),right(geopoint.userenteredcoord,7))
FROM
geopoint
WHERE
geopoint.coordrefsys = 'MGRS' AND
binary left(geopoint.userenteredcoord,
locate('|', geopoint.userenteredcoord) -1) <> upper(left(geopoint.userenteredcoord, locate('|', geopoint.userenteredcoord) -1))
ORDER BY length(geopoint.userenteredcoord)
Note: This query is in 5.x format
This query finds MGRS coordinates with blanks 4 QFJ 1234 5678.
SELECT userenteredcoord FROM geopoint WHERE coordrefsys = 'MGRS' AND userenteredcoord LIKE '% %' ORDER BY userenteredcoord ASC
Note: This query is in 5.x format