Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent of atn function
Message
De
13/04/2010 06:32:22
 
 
À
13/04/2010 03:17:51
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01459871
Message ID:
01459900
Vues:
70
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform