ST_GeomFromText takes the form ST_GeomFromText('POINT(' || raw.x || ' ' || 
raw.y || ')', 102249)

Anyrate for point geometries its more efficient to use ST_MakePoint  so 
something like


UPDATE recent
SET xypoint = ST_SetSRID(ST_MakePoint(raw.x, raw.y),102249)        
from raw
where recent.casenum=raw.casenum;

Hope that helps,
Regina


-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Donald Ijams
Sent: Tue 8/5/2008 6:00 PM
To: [email protected]
Subject: [postgis-users] Update Error
 
When I attempt to update a geometry column from a field in another table 
with:

UPDATE recent
SET xypoint = ST_GeomFromText((raw.x, raw.y),102249)        
from raw
where recent.casenum=raw.casenum;

I get:

*SQL error:*

ERROR:  function st_geomfromtext(record, integer) does not exist
LINE 3: xypoint = ST_GeomFromText((raw.x, raw.y),102249)  
                  ^
HINT:  No function matches the given name and argument types. You might need to 
add explicit type casts.


Probably something simple, but I'm not seeing it.

Don






-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to