Ok i think i have resolved this problem :P<br><br><span style="font-family: courier new,monospace;">select <a href="http://e.id">e.id</a>, AsText(p1.the_geom) as start, AsText(p2.the_geom) as final <br>    from edges as e,<br>
         points as p1</span><span style="font-family: courier new,monospace;">,<br>         points as p2 <br>    where e.start_point_id = <a href="http://p1.id">p1.id</a> and e.final_point_id = <a href="http://p2.id">p2.id</a>;</span><br>
<br>after that i get what  i want :) <br><br>if somebody has better solution for that it would be really great to share it with me :P<br><br><br><br><div class="gmail_quote">On Sun, Dec 14, 2008 at 21:20, lisek lichu <span dir="ltr"><<a href="mailto:lisek.lichu@gmail.com">lisek.lichu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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" target="_blank">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>
</blockquote></div><br>