• anthony.green (8/14/2012)


    Does the below work?

    DECLARE @Latitude float = 8.4827

    DECLARE @Longitude float = 76.9192

    DECLARE @ID int = 1

    UPDATE [dbo].[LocationCopy]

    SET

    LocationGeography = geography::STGeomFromText('POINT('@Longitude+' '+@Latitude+')', 4326)

    WHERE LocationID = @ID

    While wxecuting this query it gives error

    Msg 102, Level 15, State 1, Line 12

    Incorrect syntax near '@Longitude'.