In Geoserver i create parametric view:
SELECT *
FROM MyTable
LEFT JOIN Track On MyTable.SegmentID=Track.SegmentID
WHERE (DATEPART(yy, MyTable.Date)=%year%
AND DATEPART(mm, MyTable.Date)=%month%
AND DATEPART(dd, MyTable.Date)=%day%)
i set default values 2009-09-18
Now i go in layer preview pick my layer and see layer with features with Date=2009-09-18.
Now i want to see features with another date. In address line i add:
viewparams=year:2009
But still see same features. I try another dates but not help.
Whats wrong?
Best Answer
I dont know what heppens with my view but i delete all parameters except one and try it. And use
viewparams
parameter in Layer Preview i get features. After i add another parameters in view and my final view:And Layer Preview address look like:
I think my problem was with Bouding Box. It was too small.