5

I need to execute the ATAN2 function in MS SQL Server. How do I do this?

T-SQL appears to have all the usual math functions like cos, sin, radians etc, just not ATAN2. What is the function for this?

Knowing how to do this in MySQL would be very useful as well, please?

hazzik
  • 13,019
  • 9
  • 47
  • 86
Matt W
  • 11,753
  • 25
  • 118
  • 215

1 Answers1

12

Ok, it's ATN2.

Dang.

Sorry folks.

Matt W
  • 11,753
  • 25
  • 118
  • 215
  • I can mark it as answered in 2 days, according to the lightbox. I will do it then, as I'm sure this will be useful to someone. Like me, in the future. D'oh! – Matt W Sep 15 '14 at 12:41
  • 1
    Useful list of MS SQL T-SQL built in maths functions: http://technet.microsoft.com/en-us/library/ms177516(v=sql.110).aspx – Matt W Sep 15 '14 at 12:42
  • 2
    That's the stupidest thing I've ever seen. Why take out that A? – duffymo Sep 15 '14 at 13:11
  • @duffymo I'm sure it was [inherited from the days of Sybase](http://infocenter.sybase.com/archive/index.jsp?topic=/com.sybase.help.ase_15.0.blocks/html/blocks/blocks111.htm). Only difference is, even [Sybase was smart enough to rename it](http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1510/html/iqrefbb/Atan2.htm). – Lynn Crumbling Sep 15 '14 at 13:34
  • NO surprise - Microsoft stole Sybase during a partnering exercise. – duffymo Sep 15 '14 at 13:58
  • 1
    This is definitely useful! It saved me some trouble at least. – William Jul 20 '17 at 15:14