<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi Leo,<div><br><div>Thanks for the help. </div><div><br></div><div><p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">I tried with
the query sent by you and the resultant table I got is something as in fig1 attached.
But now I have another problem to merge line strings having same name i.e.,
Thames in attachment and get the single record with merged geometry. I used the
following query but it only gives me the geometry column.<o:p></o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt"><o:p> </o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">SELECT
ST_AsText(ST_LineMerge(geom))<u5:p></u5:p><o:p></o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">INTO
public.merge11<u5:p></u5:p><o:p></o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">FROM (SELECT
ST_Union(geom) AS geom<u5:p></u5:p><o:p></o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">FROM hyd_net
WHERE gid = 20 OR gid = 21) AS <u5:p></u5:p><o:p></o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">geom;<o:p></o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt"><o:p> </o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">Please forgive
if I am making some silly mistakes as I am new to database and PostGIS as well.</p><p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt"><br></p><p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">Thanks and Regards,</p><p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt"><o:p></o:p></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt">Yamini <o:p></o:p></p></div></div>                                      </body>
</html>