Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent of atn function
Message
From
13/04/2010 06:32:22
 
 
To
13/04/2010 03:17:51
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01459871
Message ID:
01459900
Views:
69
>What is the equivalent of the atn function as shown here in this Access example:
>
>
>UPDATE [TABLENAME] SET XAxis = (cos(((4*((4*atn(1/5))-
>  (atn(1/239))))/180)*[TABLENAME].Latitude)*cos(((4*((4*atn(1/5))-
>  (atn(1/239))))/180)*[TABLENAME].Longitude));
>
I think you can replace 4*((4*atn(1/5))-(atn(1/239))) by PI()

And if you store the Latitude and Longitude in radians, then it becomes
SET XAxis = cos([TABLENAME].Latitude) * cos([TABLENAME].Longitude)


likewise
SET YAxis = cos([TABLENAME].Latitude) * sin([TABLENAME].Longitude)
SET ZAxis = sin([TABLENAME].Latitude)
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform