[postgis-users] Math Operators

Paul Ramsey pramsey at cleverelephant.ca
Fri Jul 24 11:59:42 PDT 2009


Read up on CASE

http://www.postgresql.org/docs/8.2/static/functions-conditional.html

On Fri, Jul 24, 2009 at 11:43 AM, Bob Pawley<rjpawley at shaw.ca> wrote:
> I have an expression such as :-
>
> select (st_translate(graphics.utilities_dgm.the_geom,
>   st_x(p_id.p_id.ithe_geom) +
>   (ST_distance(p_id.p_id.the_geom, p_id.p_id.ithe_geom)
>
> I need the option of either (+) or (-) after st_x(p_id.p_id.ithe_geom),
> depending on circumstance.
>
> At the moment I am writting two expressions. Is there a way of creating one
> expression that covers both circumstances?
>
> Bob
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>



More information about the postgis-users mailing list