これまでに習得できたものは次のとおりです。
declare @i int = 7;
declare @lat float;
declare @lng float;
declare @point ???; -- what type?
declare @location table(lat float, lng float)
insert @location values (32.097218, 34.770438199999944)
insert @location values (32.083847, 34.775618)
insert @location values (32.1600788, 34.771902)
insert @location values (31.9914283, 34.80780099999993)
insert @location values (32.1574281, 34.775191800000016)
insert @location values (29.5543212, 34.89448429999993)
insert @location values (32.8018919, 34.96268420000001)
while @i > 0
begin
-- this is a wrong way to do it
set @point = (select top (1) * from @location);
-- must set @lat and @lng here somehow, based on the
-- one row selected above. Deleting here is not
-- mandatory, but may be used, if needed.
delete top (1) from @location;
update top (1) rest_tbl
set lat = @lat, lng = @lng
where lat is null and private_label_id = 3
set @i = @i - 1
end;
変数を作成している部分は気にしないでください。@location
現実の世界では、これは実際のテーブルであり、PoC に使用しているだけです。