I am new to the whole SQL Server / T-SQL area but I am basically trying to update a row in my database with a particular function and can't seem to find out how to do it.
First there are 2 columns latitude which has a value and TenLatMin which is null what I first do is check for all the null values
Select *
from zipcodes
where TenLatMin is null
DECLARE @LATMIN FLOAT
DECLARE @convert FLOAT
SET @convert= .14493
// I would like to get the latitudes from the Select and plug it there
SET @LATMIN= round(latitude - @convert,8)
// Then do the calculation and update the field
update zipcodes
set TenLatMin =
The select works because I get a list of all the Null values now what I want to do is get the latitude of each row that has a Null value and use that inside the small @LATMIN calculation so that then I can set TenLatMin to that value..
Any suggestions would be great and as I said before each row already has a latitude value .