« Return to Thread: SQL Code to update a geometry column cell by oid?

Re: SQL Code to update a geometry column cell by oid?

by Mark Cave-Ayland-3 :: Rate this Message:

Reply to Author | View in Thread

Hi Joshua,

On Monday 24 March 2008 00:26:38 Joshua Klein wrote:
> 'UPDATE geograwdata SET LatLon = GeometryFromText('POINT(somecoordinates)',
> 4326) WHERE 'oid' = (someoid)') '

UPDATE geograwdata SET LatLon = GeometryFromText('POINT(somecoordinates)',
4326) WHERE oid = someoid;

Make sure your point coordinates are space separated.

> This is the code I came up with and it's not working, what is wrong with my
> code?

I think that you just have extra 's and brackets in there - mixed-case
column names should be quoted with "s rather than 's.

BTW using internal PostgreSQL OIDs has been deprecated for years (because
they can eventually run out). You really should be using a SERIAL column
or PRIMARY KEY instead.


ATB,

Mark.

--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

 « Return to Thread: SQL Code to update a geometry column cell by oid?