Updating a Geo Column

Topics: Developer Forum, User Forum
Feb 18, 2008 at 2:35 AM
I am having a little difficulty updating a single row using the following SQL Statement
UPDATE Location
SET Name = @Name
,City = @City
,State = @State
,PostalCode = @PostalCode
,Street = @Street
,Latitude = @Lat
,Longitude = @Lon
,GeoPoint = ST.PointFromText('POINT(' + CAST(@Lon AS VARCHAR) + ' ' + CAST(@Lat AS VARCHAR) + ')', 4326)
WHERE LocationId = @LocationId

The statements does update the record, however, the ST.PointFromText updates all of the Geo column rows in the database, not just the sinlge row which should be updated by the where part of the statements. I do not see how to change this behavior.. Help 