If many Points are stored as Geometry in a Field as Multipoint, how to SELECT (and convert) all Points?
But without a procedure, while or loop, because they are too slow, and no String Conversion.
For example: in the #1 Table
MULTIPOINT(48 16,49 16,50 16)
I want to achieveve a result like:
id | point
1 | POINT(48 16)
2 | POINT(49 16)
3 | POINT(50 16)
The only "trick" here is generating a sequence of natural numbers. For that - your best bet would be to create a
numbers
table that will simply hold numbers from 1 .. Maximum number of points you think would be possible for each MultiPoint:Now that we solved that, you can use the following query to break the MultiPoint to points: