摘要:
--DROP FUNCTION F_SQLSERVER_SPLITGO CREATE FUNCTION F_SQLSERVER_SPLIT(@Long_str varchar(8000),@split_str varchar(100)) RETURNS @tmp TABLE( ID inT IDENTITY PRIMARY KEY, short_str varchar(8000) ) AS BEGIN DECLARE @long_str_Tmp varchar(8000),@short_str varchar(8000),@split_str_length int SET @split... 阅读全文
摘要:
CREATE FUNCTION ConvertXYToDistance(@la1 DECIMAL,@lo1 DECIMAL,@la2 DECIMAL,@lo2 DECIMAL)RETURNS FLOATASBEGINBEGIN RETURN (Round(6378.137*2*Asin( Sqrt( power(Sin((@la1*PI()/180)-(@la2*PI()/180))/2,2)+ Cos(@la1*PI()/180)*COS(@la2*PI()/180)*power(SIN((@lo1*PI()/180)-(@lo2*PI()/180))/2,2) ))*10000,0)/10 阅读全文