MGRS coordinates: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<pre>SELECT geopoint.userenteredcoord, concat( upper(left(geopoint.userenteredcoord, locate('|', geopoint.userenteredcoord) -1)),right(geopoint.userenteredcoord,7)) | <pre>SELECT geopoint.userenteredcoord, | ||
concat( upper(left(geopoint.userenteredcoord, locate('|', geopoint.userenteredcoord) -1)),right(geopoint.userenteredcoord,7)) | |||
FROM | FROM | ||
geopoint | geopoint | ||
WHERE | WHERE | ||
geopoint.coordrefsys = 'MGRS' AND | geopoint.coordrefsys = 'MGRS' AND | ||
binary left(geopoint.userenteredcoord, locate('|', geopoint.userenteredcoord) -1) <> upper(left(geopoint.userenteredcoord, locate('|', geopoint.userenteredcoord) -1)) | binary left(geopoint.userenteredcoord, | ||
locate('|', geopoint.userenteredcoord) -1) <> upper(left(geopoint.userenteredcoord, locate('|', geopoint.userenteredcoord) -1)) | |||
ORDER BY length(geopoint.userenteredcoord) | ORDER BY length(geopoint.userenteredcoord) | ||
Revision as of 16:25, 10 February 2014
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)
---------------------------------------------------
SELECT
user_entered_mgrs
FROM
geopoint
WHERE
coordrefsys = 'MGRS' AND user_entered_mgrs LIKE '% %'
ORDER BY
user_entered_mgrs ASC