Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

does teradata have exp function

Status
Not open for further replies.

debrarosie

IS-IT--Management
Nov 27, 2001
4
US
Does teradata v4 have a function for e? In microsoft products it's exp(number) which returns e to the power of that number.

Thanks!
 
Hi,
Yes it does.

From Volume 5 Chapter 2 of the Teradata SQL reference manual.

( click on SQL reference )
( then the version of Teradata you want ).


Arithmetic Functions

Supported Arithmetic Functions

The Teradata RDBMS provides the following arithmetic functions that require numeric arguments:


Function Result
ABS (arg) Absolute value
EXP (arg) Raises e to the power of arg (e**arg)
LN (arg) Natural logarithm; (e = 2.71828182845905)
LOG (arg) Base 10 logarithm
NULLIFZERO (arg) Returns NULL if arg is zero; else arg
SQRT (arg) Square root
ZEROIFNULL (arg) Returns zero is arg is NULL; else arg



If the argument is not numeric, it is converted to a numeric value. If the argument cannot be converted, an error is reported.

Arithmetic functions cannot be applied to GRAPHIC operands.

ANSI Compliance

The arithmetic functions are all Teradata extensions to the ANSI SQL-99 standard.
 
A far as I know there is no function to achieve this, but the ** operator can be used.

BTEQ -- Enter your DBC/SQL request or BTEQ command:
sel 2**2 (FORMAT 'Z(9)');

*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.

(2**2)
---------
4
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top