I am new to TSQL and am trying to create a function that would calculate Longitude and give a radius. I know how to do it in C# but now having difficulty translating it into T-SQL this is the multi-part function
1. double Long = (Math.Cos((double)2.55 * (Math.PI / 180)) * 69);
2. double milesss = 10 / Long;
3. item.TenLonMin = Math.Round(((double)item.longitudes - milesss), 6);
The answer to all of this is step 3 and I would like to put that inside this
UPDATE zips
SET
TwoLonMax= answer to step 3 here
How can I go about doing this? I have bee trying to find out how I can plug in the results of user defined functions.
Yes you can do it in T-SQL but its performance will be poor, comparing with C#, C++ and most programming languages:
I just used your own calculation method.