Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Could Someone help me?

I am having some difficulties creating KML views.

I am trying this SQL:

SELECT the_geom FROM lighting.history WHERE stroke_time BETWEEN %inicialtime% and %finaltime% and stroke_type = 1

I get this error: Failed to create SQL view: ERROR: syntax error at or near ")" Position: 147

I basically need to retrieve lightning stroke between a period of time. Example:

SELECT the_geom FROM lighting.history WHERE stroke_time BETWEEN '2013-09-03 00:00:00' and '2013-09-03 23:59:59' and stroke_type = 1

The field stroke_time is timestamp.

I am using GeoServer to create this KML or OpenLayers

Thank you.

share|improve this question
see docs.geoserver.org/latest/en/user/data/database/sqlview.html , my best guess is that your timestamp is escaped incorrectly when you try to access view from geoserver. –  simplexio Sep 4 '13 at 6:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.