[Mapserver-users] null values in postgis
Kathi Koebke
koebke at zadi.de
Wed Jul 28 05:17:36 PDT 2004
Hey Vladimir,
sorry that I'm so late with my answer, but here is my sql-statement.
The result is an empty map in mapserver.
Maybe there' s something wrong in the sql-code or mapserver can't work
with NULL values? I don't know?
DATA "the_geom FROM xyz (SELECT ha_dk CASE WHEN ha_dk IS NULL THEN ''
ELSE CAST(ha_dk AS VARCHAR) END AS ha_dk)"
EXPRESSION ([ha_dk] = '')
Tschüß Kathi
Vladimir Guzmán schrieb:
> I've had a simmilar problem, but with oracle, and what I did was a
> casting, for example:
>
> data=the_geom FROM (SELECT CASE WHEN field IS NULL THEN ' ' ELSE
> CAST(field AS VARCHAR) END AS field)
>
> And the expression would be:
> EXPRESSION ([field] = ' ')
>
> I don't know if there is a better way to do that, but it worked.
>
> Hope that helps,
>
--
Kathi Köbke
Projektkoordinatorin ENV
ZADI - Zentralstelle für
Agrardokumentation und -information
Villichgasse 17, D-53177 Bonn, Germany
Tel: +49 (228) 95 48 406
Fax: +49 (228) 95 48 111
E-Mail: koebke at zadi.de
http://www.zadi.de
More information about the MapServer-users
mailing list