<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><FONT color=#0000ff
size=2 face=Arial>Bob,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><FONT color=#0000ff
size=2 face=Arial>If you want to skip over linestrings in your update, you
should move that condition out of your correlated sub query. The way you
had it, since its a subselect and valu is setting the ip_target it has to be run
for all records.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><FONT color=#0000ff
size=2 face=Arial>so change to </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><FONT color=#0000ff
size=2 face=Arial>Something like</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009>
<DIV><FONT face=Arial><FONT size=2><SPAN class=500480721-09062009>UPDATE
</SPAN>temp_arrow<BR> set ip_target = <BR> ( select
(st_translate(graphics.utilities_dgm.the_geom, <BR> st_x
(st_startpoint(temp_arrow.ithe_geom))-<BR> st_x
(st_startpoint(graphics.utilities_dgm.the_geom)) ,<BR> st_y
(st_centroid(temp_arrow.ithe_geom))-<BR> st_y
(st_startpoint(graphics.utilities_dgm.the_geom)))) <BR> from
graphics.utilities_dgm, temp_arrow, p_id.p_id, p_id.processes<BR> where
temp_arrow.graphic_id = p_id.p_id.process_graphic_id<BR> and
p_id.p_id.process_id = p_id.processes.process_id<BR> and
p_id.processes.fluid_id = temp_arrow.fluid_id<BR> and
graphics.utilities_dgm.utilities_description = 'Arrow_Flow_Direction' <BR>
and graphics.utilities_dgm.orientation = p_id.p_id.ip_orient )<SPAN
class=828210721-09062009><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV><SPAN class=828210721-09062009><FONT face=Arial><FONT size=2><SPAN
class=500480721-09062009></SPAN></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=828210721-09062009><FONT face=Arial><FONT size=2><SPAN
class=500480721-09062009>WHERE </SPAN>ST_GeometryType(temp_arrow.ithe_geom) =
'ST_MultiLineString' </FONT></FONT></SPAN></DIV>
<DIV><SPAN class=828210721-09062009><FONT size=2
face=Arial></FONT></SPAN> </DIV><SPAN class=828210721-09062009><FONT
face=Arial><FONT size=2></FONT></FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500480721-09062009><SPAN
class=828210721-09062009>
<DIV><SPAN class=500480721-09062009></SPAN><FONT size=2 face=Arial>L<SPAN
class=500480721-09062009>eo</SPAN><BR> </FONT></SPAN></DIV></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Bob
Pawley<BR><B>Sent:</B> Tuesday, June 09, 2009 4:27 PM<BR><B>To:</B> PostGIS
Users Discussion<BR><B>Subject:</B> [postgis-users] Empty
Geometry<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT size=2 face=Arial>In the past, when the update conditions are not
met, the update transaction doesn.t finalize.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>However when I run the following update
function where ST_GeometryType(temp_arrow.ithe_geom) =
'ST_MultiLineString' is not true, then the return is a null
value.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Is there a workaround to this
problem??</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> update temp_arrow<BR> set
ip_target = <BR> ( select
(st_translate(graphics.utilities_dgm.the_geom, <BR> st_x
(st_startpoint(temp_arrow.ithe_geom))-<BR> st_x
(st_startpoint(graphics.utilities_dgm.the_geom)) ,<BR> st_y
(st_centroid(temp_arrow.ithe_geom))-<BR> st_y
(st_startpoint(graphics.utilities_dgm.the_geom)))) <BR> from
graphics.utilities_dgm, temp_arrow, p_id.p_id, p_id.processes<BR> where
temp_arrow.graphic_id = p_id.p_id.process_graphic_id<BR> and
p_id.p_id.process_id = p_id.processes.process_id<BR> and
p_id.processes.fluid_id = temp_arrow.fluid_id<BR> and
ST_GeometryType(temp_arrow.ithe_geom) =
'ST_MultiLineString' <BR> and
graphics.utilities_dgm.utilities_description = 'Arrow_Flow_Direction' <BR>
and graphics.utilities_dgm.orientation = p_id.p_id.ip_orient );</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Bob</FONT></DIV></BODY></HTML>