Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!
DECLARE @BranchCSVFileName varchar(255) DECLARE @lat numeric(18,6) DECLARE @lon numeric(18,6) DECLARE @MaxDistance int DECLARE @dynamicdistancesql varchar(1000) SET @BranchCSVFileName = JewsonTest SET @lat = 51.400444 SET @lon = -1.318205 SET @MaxDistance = 10 SET @dynamicdistancesql = 'INSERT INTO '+@BranchCSVFileName+' (DistanceMiles, Postcode, Lat, Lon) SELECT * FROM (SELECT CAST(dbo.Distance('+@lat+', '+@lon+', Lat, Lon) as decimal (10,1)) As DistanceMiles, [Postcode], [Lat], [Lon] FROM [Postcodes] WHERE (Lat <> 0) AND (Lon <> 0)) As T WHERE DistanceMiles<='+@MaxDistance+' ORDER BY DistanceMiles' Exec (@dynamicdistancesql)
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.