Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Parameterizing SQL Views Timestamp Issue

$
0
0

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.


Viewing all articles
Browse latest Browse all 1138

Latest Images

Trending Articles



Latest Images