I went the view route for the time being, to get one of the class types (layer)
up and running. I was basing my questions on the fact that I’ve successfully
passed in all sorts of SQL into the Postgres connector with MapServer, but the
Oracle connector seems to be some limited in what it can send in successfully,
or there are some escaping sequences I don’t know about.
I tried a few things for making it work the fly, but nothing was working.
I ended up creating a view as Dan Little suggested. I could probably get by
with doing the FOLDERTYPE filtering (Last line below) in the MapFile as a quick
way of making all the Permit class types work.
create view
PW_SK_Permits
as
select
P.DEPARTMENT,
P.INDATE,
CASE WHEN
P.INDATE < SYSDATE - 365 * 5
THEN
'older'
ELSE
'newer'
END as age,
P.FOLDERTYPE,
P.FOLDERDESC,
P.FOLDERRSN,
P.FOLDERID,
A.PIN,
A.GEOMETRY,
A.OGR_FID
from
STAMP.PW_Permits P, ADDRESS_ACTIVE_OGR_VIEW A
where
P.PIN is not NULL
and
P.PIN = A.PIN
and
P.FOLDERTYPE IN ('SK') -- PW Sidewalks
I needed to get this SideWalk Permit layer up and running either way.
Something similar to the inner select above works just fine via
MapServer/Postgres though.
Now how to figure things out for the other 119 permit types. :c)
bobb
On Apr 4, 2016, at 5:28 AM, Martin Icking
<[email protected]<mailto:[email protected]>> wrote:
Or you could create a calculated column in the data statement, call it e.g.
"AGE" being the result of the difference of your original date column and
the oracle sysdate.
Then you can easily use that "AGE" column to do your styling.
HTH
Martin
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Oracle-SYSDATE-in-EXPRESSION-tp5258709p5259480.html
Sent from the Mapserver - User mailing list archive at
Nabble.com<http://nabble.com>.
_______________________________________________
mapserver-users mailing list
[email protected]<mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users