• anthony.green (8/14/2012)


    Doh, forgot the +, should of been an easy one to spot

    DECLARE @Latitude float = 8.4827

    DECLARE @Longitude float = 76.9192

    DECLARE @ID int = 1

    UPDATE [MarvelTour_DEV].[dbo].[LocationCopy]

    SET

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

    WHERE LocationID = @ID

    this error is generated

    Msg 8114, Level 16, State 5, Line 5

    Error converting data type varchar to float.