[postgis-users] SQL Code to update a geometry column cell by oid?
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Mon Mar 24 02:01:32 PDT 2008
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
More information about the postgis-users
mailing list