<html><head></head><body bgcolor="#FFFFFF"><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">On Jul 23, 2012, at 5:26 PM, "Bob Pawley" <<a href="mailto:rjpawley@shaw.ca">rjpawley@shaw.ca</a>> wrote:</span><br></div><div><br></div><div></div><blockquote type="cite"><div>

<div dir="ltr">
<div style="FONT-FAMILY: 'Arial Narrow'; COLOR: #00002b; FONT-SIZE: 12pt">
<div>Hi</div>
<div> </div>
<div>I an collecting geometries as in this expression.</div>
<div> </div>
<div>update num_search</div>
<div>    set the_geom4 =</div>
<div>    (select st_union(st_union(st_union(st_buffer(a.mbr, 
buff), st_buffer(b.mbr, buff)),</div>
<div>        st_buffer(bob.face.mbr, 
buff)))    </div>
<div>    from  bob.face a, bob.face b, num_search, 
bob.face</div>
<div>    where (st_touches(a.mbr, b.mbr)</div>
<div>    and st_intersects(a.mbr, num_search.the_geom2))</div>
<div>    and st_intersects(bob.face.mbr, 
num_search.the_geom2));</div>
<div> </div>
<div>When I reference the_geom4 with a geometry number st_geometryn, the numbers 
are in a random order. (example1,3,2,5,4,6)</div>
<div> </div>
<div>Is there a method that can be used to sort them in either ascending or 
descending order??</div>
<div> </div>
<div></div></div></div></div></blockquote><blockquote type="cite"><div><br></div></blockquote><br><div><br></div><div>Order in SQL query result is never guaranteed unless you use ORDER BY. </div><div><br></div><div><br></div><div>--</div><div>Puneet Kishor</div></body></html>