[postgis-users] Advanced query problem
Krishnaa Sridharan
kichis at gmail.com
Sat Feb 25 08:36:42 PST 2006
Hi all,
I am new to Postgis and was working on the advanced query shown in the
manual. When i did the query everything worked well. But I have a problem
when querying something like this...
Table one (ROOMS) with example data (A proper table with spatial ref)
room_no
101
102
....
Table two (MAINT) with example data(table to get data from)
room_no maint_details
101 Fixed bulbs
101 Fixed lheat
.......
when i do a query like this:
the_geom FROM (SELECT rooms.the_geom AS the_geom, rooms.oid AS oid,
maint.maint_details AS maint_details, FROM rooms LEFT JOIN maint ON
rooms.room_no = maint.room_no) AS new_table USING UNIQUE oid USING SRID=-1
it seems to work well on points with just one value. But if there are
multiple values in the second table as shown, The first name repeats the
number of times it is in the table. is there a way to fix this. I am really
new to this please help me
Thanks
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060225/d365c437/attachment.html>
More information about the postgis-users
mailing list