I'm trying to update a column wkb_geometry in a table locations by creating a point from the eastings and northings cols from the same table. The database is PostGreSQL with PostGIS extension:
UPDATE locations
SET wkb_geometry = st_geometryfromtext('POINT(locations.easting locations.northing)',2770);
I'm getting the following error:
ERROR: parse error - invalid geometry
SQL state: XX000
Hint: "POINT(lo" <-- parse error at position 8 within geometry
The column has been added like this:
ALTER TABLE locations ADD COLUMN wkb_geometry geometry(Geometry,27700);
I suspect that locations.easting and locations.northing are not being substituted with actual values from the respective columns but am not sure how to fix this. The answer I'm after will show how to substitute the easting and northing string with actual values from the column