hello i have simple problem but I'm new in SQL so I will as here :P<br><br>i have 2 tables<br><br><br><span style="font-family: courier new,monospace;">CREATE TABLE points (</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">id      SERIAL PRIMARY KEY</span><span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">SELECT AddGeometryColumn('','points','the_geom','4326','POINT',2);</span><br style="font-family: courier new,monospace;"><br><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">CREATE TABLE edges (</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">id                SERIAL PRIMARY KEY,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">start_point_id    INTEGER REFERENCES points (id) ON DELETE RESTRICT ON UPDATE CASCADE,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">final_point_id    INTEGER REFERENCES points (id) ON DELETE RESTRICT ON UPDATE CASCADE</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">);</span><br><br>and right now I want to write a query to get in one line id from edges, and two geometrical points (start and final)<br>something like this:<br><br><span style="font-family: courier new,monospace;">select <a href="http://e.id">e.id</a>, AsText(p.the_geom) as start, AsText(p.the_geom) as final<br>
   from edges as e,points as p<br>   where ???</span><br><br>and I dont knoe how to write thi query to get in one line edge ID and two geometrical points (start and final)<br><br>Can somebody help me with that?<br>