You don't need to create additional columns to check exising ones in
WHERE-clause, so your query is simlply:

SELECT * FROM public.lines WHERE ST_IsClosed(lines.linestring);

2014-09-14 23:21 GMT+03:00 Christopher Braune <[email protected]>:

> Hello PostGIS-Users,
>
> I want to select all closed lines in my dataset. I think the function
> ST_IsClosed is usefull for this task.
>
> I tried the following SQL-Sentence:
> >>
> SELECT *, (SELECT ST_IsClosed(lines.linestring) AS tof) FROM public.lines
> WHERE tof='TRUE';
> <<
>
> I get this error-message:
>
> >>
> ERROR:  column "tof" does not exist
> LINE 3: ...s.linestring) AS tof) FROM public.lines WHERE tof='TRUE'...
>                                                         ^
> ********** Fehler **********
>
> ERROR: column "tof" does not exist
> SQL Status:42703
> Zeichen:131
> <<
>
> Can anybody help me? In general I want to know how I use the
> boolean-results (like ST_IsClosed) in nested queries.
>
> Best regards,
> Christopher
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 
Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
xmpp:[email protected] mailto:[email protected]
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to