100% found this document useful (1 vote)
812 views

Informatica Functions

The document contains a list of various function types and their corresponding functions in SQL. It includes aggregate functions, character functions, conversion functions, data cleansing functions, date functions, encoding functions, financial functions, numeric functions, scientific functions, special functions, string functions, test functions, and variable functions. For each function, it provides the function name, syntax, and return value.

Uploaded by

Manoj Krishna
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
812 views

Informatica Functions

The document contains a list of various function types and their corresponding functions in SQL. It includes aggregate functions, character functions, conversion functions, data cleansing functions, date functions, encoding functions, financial functions, numeric functions, scientific functions, special functions, string functions, test functions, and variable functions. For each function, it provides the function name, syntax, and return value.

Uploaded by

Manoj Krishna
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 46

INTERNAL

Type Functions
AVG
COUNT
FIRST
LAST
MAX (Date)
MAX (Number)
MAX (String)
Aggregate Functions MEDIAN
MIN (Date)
MIN (Number)
MIN (String)
PERCENTILE
STDDEV
SUM
VARIANCE

ASCII
CHR
CHRCODE
CONCAT
INITCAP
INSTR
LENGTH
LOWER
LPAD
Character Functions
LTRIM
METAPHONE
REPLACECHR
REPLACESTR
RPAD
RTRIM
SOUNDEX
SUBSTR
UPPER

TO_BIGINT
TO_CHAR(Number)
TO_DATE
Conversion Functions
TO_DECIMAL
TO_FLOAT
TO_INTEGER

GREATEST
IN

INTERNAL
INTERNAL

INSTR
IS_DATE
IS_NUMBER
IS_SPACES
ISNULL
LEAST
LTRIM
METAPHONE
REG_EXTRACT
REG_MATCH
Data Cleansing Functions
REG_REPLACE
REPLACECHR
REPLACESTR
RTRIM
SOUNDEX
SUBSTR
TO_BIGINT
TO_CHAR
TO_DATE
TO_DECIMAL
TO_FLOAT
TO_INTEGER

ADD_TO_DATE
DATE_COMPARE
DATE_DIFF
GET_DATE_PART
IS_DATE
LAST_DAY
MAKE_DATE_TIME
Date Functions
MAX
MIN
ROUND(Date)
SET_DATE_PART
SYSTIMESTAMP
TO_CHAR(Date)
TRUNC(Date)

AES_DECRYPT
AES_ENCRYPT
COMPRESS
CRC32
Encoding Functions
DEC_BASE64
DECOMPRESS
ENC_BASE64

INTERNAL
Encoding Functions
INTERNAL

MD5

FV
NPER
Financial Functions PMT
PV
RATE

ABS
CEIL
CONV
CUME
EXP
FLOOR
LN
LOG
MAX
Numeric Functions MIN
MOD
MOVINGAVG
MOVINGSUM
POWER
RAND
ROUND
SIGN
SQRT
TRUNC

COS
COSH
SIN
Scientific Functions
SINH
TAN
TANH

ABORT
DECODE
Special Functions ERROR
IIF
LOOKUP

CHOOSE
INDEXOF
String Functions MAX
MIN

INTERNAL
String Functions INTERNAL

REVERSE

ISNULL
IS_DATE
Test Functions
IS_NUMBER
IS_SPACES

SetCountVariable
SetMaxVariable
Variable Functions
SetMinVariable
SetVariable

INTERNAL
INTERNAL

Funcation name Syntax Return value

ABORT ABORT( string ) string

ABS ABS( numeric_value ) Numeric(Positive)

ADD_TO_DATE ADD_TO_DATE( date, format, amount ) Date

String(Decrypted
AES_DECRYPT AES_DECRYPT ( value, key ) value)

binary(Encrypted
AES_ENCRYPT AES_ENCRYPT ( value, key ) value)

ASCII ASCII ( string ) Integer

AVG( numeric_value ,
AVG Numeric
[filter_condition])

CEIL CEIL( numeric_value ) Numeric

CHOOSE( index, string1 [, string2, ...,


CHOOSE String
stringN] )

CHR CHR( numeric_value ) String

CHRCODE Same

COMPRESS COMPRESS( value ) Binary

CONCAT CONCAT( first_string, second_string ) String

INTERNAL
INTERNAL

CONVERT_BASE( value, source_base,


CONVERT_BASE Numeric
dest_base )
COS COS( numeric_value ) Double
COSH COS( numeric_value ) Double

COUNT( value ,[filter_condition] )


COUNT or Numeric
COUNT( * ,[ filter_condition] )

CRC32 CRC32( value ) Integer

CUME( numeric_value ,
CUME Numeric
[filter_condition] )

DATE_COMPARE DATE_COMPARE( date1, date2 ) Integer

DATE_DIFF DATE_DIFF( date1, date2, format ) Double

DEC_BASE64 DEC_BASE64( value ) Binary

DECODE( value, first_search, Any data type


DECODE first_result [, second_search, except binary
second_result]...[,default] )

DECOMPRESS DECOMPRESS( value, precision ) Binary

ENC_BASE64 ENC_BASE64( value ) string

INTERNAL
INTERNAL

ERROR ERROR( string ) String

EXP EXP( exponent ) Double

Any data type


FIRST FIRST( value ,[ filter_condition ] ) except binary

FLOOR FLOOR( numeric_value ) Numeric

FV( rate, terms, payment [, present


FV Numeric
value, type] )

GET_DATE_PART GET_DATE_PART( date, format ) Numeric

GREATEST( value1, [value2, ..., valueN,] Any data type


GREATEST CaseFlag ) except binary

Any data type


IIF IIF( condition, value1 [,value2] ) except binary

INTERNAL
INTERNAL

IN( valueToSearch, value1, [value2, ..., TRUE(1)


IN valueN,] CaseFlag ) ,FALSE(0),NULL

INDEXOF( valueToSearch, string1,


INDEXOF Numeric
[string2, ..., stringN,] CaseFlag )

Any data type


INITCAP INITCAP( string ) except binary

INSTR( string, search_value [,start


INSTR Numeric
[,occurrence [,comparison_type ]]] )

ISNULL ISNULL( value ) 1(True) or 0(False)

IS_DATE( value [,format] ) (Value Must


IS_DATE Integer
be a string datatype

INTERNAL
INTERNAL

IS_NUMBER IS_NUMBER( value ) (Value Must be String/Numeric


a string datatype

IS_SPACES( value ) Argumant must be


IS_SPACES 0 or 1 or NULL
string data type

Any data type


LAST LAST( value [, filter_condition ] ) except binary

LAST_DAY LAST_DAY( date ) Date

LEAST( value1, [value2, ..., valueN,] Any data type


LEAST CaseFlag ) except binary

LENGTH LENGTH( string ) Numeric

LN LN( numeric_value ) Double

INTERNAL
INTERNAL

LOG LOG( base, exponent ) Double

Use the Lookup transformation rather than the LOOKUP function to look up values in PowerCenter
LOOKUP compatibility in the session properties. This option exists expressly for PowerMart 3.5 us

LOWER LOWER( string ) String

LPAD( first_string, length


LPAD String
[,second_string] )

LTRIM LTRIM( string [, trim_set] ) String

Date as
MAKE_DATE_TIME( year, month, day,
MAKE_DATE_TIME MM/DD/YYYY
hour, minute, second, nanosecond ) HH24:MI:SS

MAX (Dates) MAX( date [, filter_condition] ) Date

MAX( numeric_value [, filter_condition]


MAX (Numbers) Numeric
)

MAX (String) MAX( string [, filter_condition] ) String

INTERNAL
INTERNAL

Unique 32-
character string of
MD5 MD5( value ) hexadecimal digits
0-9 and a-f

MEDIAN( numeric_value [,
MEDIAN Numeric
filter_condition ] )

METAPHONE METAPHONE( string [,length] ) String

MIN (Dates) MIN( date [, filter_condition] ) Date

MIN( numeric_value [,
MIN (Numbers) Numeric
filter_condition] )

MIN (String) MIN( string [, filter_condition] ) String

INTERNAL
INTERNAL

MOD MOD( numeric_value, divisor ) Numeric

MOVINGAVG( numeric_value, rowset [,


MOVINGAVG Numeric
filter_condition] )

MOVINGSUM( numeric_value, rowset


MOVINGSUM Numeric
[, filter_condition] )

NPER( rate, present value, payment [,


NPER Numeric
future value, type] )

PERCENTILE( numeric_value, percentile


PERCENTILE Numeric
[, filter_condition ] )

PMT( rate, terms, present value[, future


PMT Numeric
value, type] )

INTERNAL
INTERNAL

POWER POWER( base, exponent ) Double

PV( rate, terms, payment [, future


PV Numeric
value, type] )

RAND RAND( seed ) Numeric

RATE( terms, payment, present


RATE Numeric
value[, future value, type] )

REG_EXTRACT REG_EXTRACT( subject, 'pattern', String


subPatternNum )

REG_MATCH REG_MATCH( subject, pattern ) True/FALSE/NULL

REG_REPLACE( subject, pattern,


REG_REPLACE String
replace, numReplacements )

INTERNAL
INTERNAL

REPLACECHR REPLACECHR( CaseFlag, InputString, String


OldCharSet, NewChar )

REPLACESTR ( CaseFlag, InputString,


REPLACESTR OldString1, [OldString2, ... OldStringN,] String
NewString )

REVERSE REVERSE( string ) String

ROUND (Dates) ROUND( date [,format] ) Date

ROUND (Numbers) ROUND( numeric_value [, precision] ) Numeric

RPAD( first_string, length


RPAD String
[,second_string] )

INTERNAL
INTERNAL

RTRIM RTRIM( string [, trim_set] ) String

Any data type


SETCOUNTVARIABLE SETCOUNTVARIABLE( $$Variable ) except binary

SET_DATE_PART SET_DATE_PART( date, format, value ) Date

Any data type


SETMAXVARIABLE SETMAXVARIABLE( $$Variable, value ) except binary

Any data type


SETMINVARIABLE SETMINVARIABLE( $$Variable, value ) except binary

Any data type


SETVARIABLE SETVARIABLE( $$Variable, value ) except binary

INTERNAL
INTERNAL

SIGN SIGN( numeric_value ) Integer

SIN SIN( numeric_value ) Double

SINH SINH( numeric_value ) Double

SOUNDEX SOUNDEX( string ) String

SQRT(numeric_value ) --Must be
SQRT Double
positive

STDDEV( numeric_value
STDDEV Numeric
[,filter_condition] )

SUBSTR SUBSTR( string, start [,length] ) String

SUM( numeric_value [,
SUM Numeric
filter_condition ] )

INTERNAL
INTERNAL

SYSTIMESTAMP SYSTIMESTAMP( [format] ) Timestamp

TAN TAN( numeric_value ) Double

TANH TANH( numeric_value ) Double

TO_BIGINT TO_BIGINT( value [, flag] ) BigInt

TO_CHAR (Dates) TO_CHAR( date [,format] ) String

TO_CHAR (Numbers) TO_CHAR( numeric_value ) String

TO_DATE TO_DATE( string [, format] ) Date

INTERNAL
INTERNAL

TO_DECIMAL TO_DECIMAL( value [, scale] ) Decimal

TO_FLOAT TO_FLOAT( value ) Double

TO_INTEGER TO_INTEGER( value [, flag] ) Integer

TRUNC (Dates) TRUNC( date [,format] ) Date

TRUNC (Numbers) TRUNC( numeric_value [, precision] ) Numeric

UPPER UPPER( string ) String

VARIANCE( numeric_value [,
VARIANCE Double
filter_condition ] )

INTERNAL
INTERNAL

Ex:

ABORT('Employee salary is negative')

ABS( 100 - 200 ) =100

ADD_TO_DATE ('Jan 12 1998 2:00:30AM


', 'MM', 1 ) =Feb 12 1998 12:00:30AM

AES_DECRYPT( SSN_ENCRYPT, SUBSTR( SSN,1,3 ))

AES_ENCRYPT( SSN, SUBSTR( SSN,1,3 ))

ASCII( 'Flashlight' ) =70

AVG( WHOLESALE_COST, ITEM_NAME='Flashlight' )

CEIL(39.79)=40 , CEIL(-100.99)=-100

CHOOSE( 2, 'knife', 'flashlight', 'diving hood' ) = 'flashlight'

CHR(65)='A' , CHR(122)='z'

Same as ASCII Function

The source contains a row that is 10 MB. You can compress the
data in this row using COMPRESS. When you compress the data,
you decrease the amount of data the PowerCenter Integration
Service writes over the network. As a result, you may increase
performance.

CONCAT('SHIRISH','GANTA')='SHIRISHGANTA'

INTERNAL
INTERNAL

CONVERT_BASE( "2222", 10, 2 )=100010101110

COUNT( ITEM_NAME, IN_STOCK < 5 )

CUME( PERSONAL_SALES )- For ex:


4000 4000
3000 7000
1000 8000

DATE_COMPARE(Jan 1 1997, Jan 13 1997)


= -1

DATE_DIFF( DATE_PROMISED, DATE_SHIPPED, 'D' )


Jan 1 1997 12:00:00AM , Mar 29 1997 12:00:00PM = -87.5

DECODE ( CONST_NAME
'Five', 5,
'Pythagoras', 1.414213562,
'Archimedes', 3.141592654,
'Pi', 3.141592654 )
DECODE( TRUE,
Var1 = 22, 'Variable 1 was 22!',
Var2 = 49, 'Variable 2 was 49!',
Var1 < 23, 'Variable 1 was less than 23.',
Var2 > 30, 'Variable 2 was more than 30.',
'Variables were out of desired ranges.')

INTERNAL
INTERNAL

IIF( SALARY < 0, ERROR ('Error. Negative salary found. Row


skipped.', EMP_SALARY )

EXP(10)=22026.4657948067

FIRST( ITEM_NAME, ITEM_PRICE < 10 )


ITEM_NAME ITEM_PRICE
Flashlight 35.00
Navigation Compass 8.05
Regulator System 150.00
Flashlight 29.00
RETURN VALUE: Navigation Compass

Floor(39.79)=39 , Floor(-100.99)=-101

FV(0.0075, 12, -250, -2000, TRUE)=$5,337.96

GET_DATE_PART( DATE_SHIPPED, 'Y' )


Jan 15 1998 2:10:30AM 1998
Dec 20 1999 3:29:55PM 1999
GET_DATE_PART( DATE_SHIPPED, 'MM' )
Jan 15 1998 2:10:30AM 1
Dec 20 1998 3:29:55PM 12
GET_DATE_PART( DATE_SHIPPED, 'D' )
Jan 15 1998 2:10:31AM 15
Dec 31 1998 11:59:59PM 31

GREATEST( QUANTITY1, QUANTITY2, QUANTITY3 )


150 ,756,23 Returns: 756

IIF( SALES > 100, EMP_NAME )


Sales Emp_name Return value
150 Shirish Shirish
99 Ganta '' (Empty String)
NULL Raju '' (Empty String)

INTERNAL
INTERNAL

IN( ITEM_NAME, ‘Chisel Point Knife’, ‘Medium Titanium Knife’,


‘Safety Knife’, 0 )
ITEM_NAME RETURN VALUE
Flashlight 0 (False)
NULL NULL
Safety Knife 1 (True)

INDEXOF( ITEM_NAME, ‘diving hood’, ‘flashlight’, ‘safety knife’)


ITEM_NAME RETURN VALUE
flashlight 2
NULL NULL
safety Knife 3
Safety Knife 0

INITCAP(ITEM_NAME)
ITEM_NAME Return value
flash light Flash Light
NULL NULL
18-albert 18-Albert
?!SAM ?!Sam

INSTR( ITEM_NAME, 'a' )


ITEM_NAME RETURN VALUE
flashlight 3
NULL NULL
safety Knife 2

ISNULL( ITEM_NAME )
ITEM_NAME RETURN VALUE
Flashlight 0 (False)
NULL 1 (True)
'' 0 (False)

IS_DATE( INVOICE_DATE, 'YYYY/MM/DD' )


INVOICE_DATE RETURN VALUE
'04/01/98' 0 (False)
NULL NULL
'1998/01/12' 1 (TRUE)

INTERNAL
INTERNAL

IS_NUMBER( ITEM_PRICE )
ITEM_PRICE RETURN VALUE
'abc' 0 (False)
NULL NULL
'123' 1 (TRUE)
'289 ' 1(TRUE)

IS_SPACES( ITEM_NAME )
ITEM_NAME RETURN VALUE
Flashlight 0 (False)
1 (True)

LAST( ITEM_NAME, ITEM_PRICE > 10 )


ITEM_NAME ITEM_PRICE
Flashlight 35.00
Navigation Compass 8.05
Regulator System 150.00
Flashlight 29.00
RETURN VALUE: Flashlight

LAST_DAY( ORDER_DATE )
Jan 15 1998 2:10:30AM Jan 31 1998 12:00:00AM
Dec 20 1998 3:29:55PM Dec 31 1998 12:00:00AM
LAST_DAY( TO_DATE( ORDER_DATE, 'DD-MON-YY' ))
'01-Jan-98' Jan 31 1998 12:00:00 AM
NULL NULL
'18-FEB-96' Feb 29 1996 00:00:00 (Leap year)

LEAST( QUANTITY1, QUANTITY2, QUANTITY3 )


150 ,756,23 Returns: 23

LENGTH( CUSTOMER_NAME )
ex:Bernice Davis= 13

LN( NUMBERS )
Numbers Return
10 2.302585092994
125 4.828313737302
NULL NULL

INTERNAL
INTERNAL

LOG( BASE, EXPONENT )


BASE EXPONENT RETURN
15 1 0
10 -2 Error.
NULL 18 NULL

e LOOKUP function to look up values in PowerCenter mappings. If you use the LOOKUP function in a mapping, you need to enable the look
ties. This option exists expressly for PowerMart 3.5 users who want to continue using the LOOKUP function, rather than creating Lookup tra

LOWER(ITEM_NAME)
ITEM_NAME Return value
FLASHLIGHT flashlight
NULL NULL
SHIRISH shirish

LPAD( ITEM_NAME, 10,'*.*')


ITEM_NAME RETURN VALUE
Page *.**.*Page
Osborne *.*Osborne
NULL NULL
Sawyer *.**Sawyer
H. Bender *.H. Bender

LTRIM( LAST_NAME, 'S.')


ITEM_NAME RETURN VALUE
NULL NULL
S. MacDonald MacDonald
Sawyer awyer
Steadman teadman

MAKE_DATE_TIME( SALE_YEAR, SALE_MONTH, SALE_DAY,


SALE_HOUR, SALE_MIN, SALE_SEC )
2013 11 28 2 23 34 Return: 11/28/2013 02:23:34

MAX( ORDERDATE, ITEM_NAME='Flashlight' )


The above expression returns the maximum order date for
flashlights.

MAX( PRICE, ITEM_NAME='Flashlight' )


The above expression returns the maximum price for flashlights.

MAX( ITEM_NAME,MANUFACTURER_ID='104' )
The above expression returns the maximum item_name for
Manufacture_id 104.

INTERNAL
INTERNAL

You want to write changed data to a database. Use MD5 to


generate checksum values for rows of data you read from a
source.
When you run a session, compare the previously generated
checksum values against the new checksum values.
Then, write the rows with updated checksum values to the
target. You can conclude that an updated checksum value
indicates that the data has changed.

MEDIAN( SALES, ITEM = 'Stabilizing Vest' )


The above expression returns the median value for orders of
stabilizing vests.

METAPHONE( EMPLOYEE_NAME, 4 )
Employee_Name Return Value
John JHN
1ABC ABK
*@#$ NULL
P$%%oc&&KMNL PKKM

The following expression returns the oldest order date for


flashlights:
MIN( ORDER_DATE, ITEM_NAME='Flashlight' )

The following expression returns the minimum price for


flashlights:
MIN ( PRICE, ITEM_NAME='Flashlight' )

The following expression returns the minimum item name for


manufacturer ID 104:
MIN ( ITEM_NAME, MANUFACTURER_ID='104' )

INTERNAL
INTERNAL

MOD( PRICE, QTY )


PRICE QTY Return Value
10.00 2 0
12.00 5 2
25 0 Error.
NULL 3 NULL
20.00 NULL NULL

The following expression returns the average order for a


Stabilizing Vest, based on the first five rows in the Sales port, and
thereafter, returns the average for the last five rows read:
MOVINGAVG( SALES, 5 )

The following expression returns the sum of orders for a


Stabilizing Vest, based on the first five rows in the Sales port, and
thereafter, returns the average for the last five rows read:
MOVINGSUM( SALES, 5 )

The following expression returns 9 as the number of periods for


which you need to make the payments:
NPER( 0.01, -2000, -500, 20000, TRUE )

The following expression returns the salary that falls at the 75th
percentile of salaries greater than $50,000:
PERCENTILE( SALARY, 75, SALARY > 50000 )

PMT( 0.01, 10, 20000 ) returns:-2111.64 as the monthly


payment amount of a loan

INTERNAL
INTERNAL

POWER( NUMBERS, EXPONENT )


Numbers EXPONENT RETURN
10 2 100
-3 5.5 729.0
-3 6 .0 729.0
NULL 18 NULL

PV( 0.0075, 12, -500, 20000, TRUE ) returns:12,524.43

RAND (1) Sample value:0.417022004702574

RATE( 48, -500, 20000 ) Returns: 0.0077 as the monthly interest


rate of a loan

REG_EXTRACT( EMP_NAME, '(\w+)\s+(\w+)\s+(\w+)',2)


EMP_NAME RETURN VALUE
Page brown Smith brown
Juan Carl fernando Carl
NULL NULL
Stephen Graham Smith Graham

REG_MATCH (Phone_Number, '(\d\d\d-\d\d\d-\d\d\d\d)' )


Phone Return value
809-555-0269 TRUE
809-555-02 FALSE
831 555 12123 FALSE

REG_REPLACE( EMP_NAME, ‘\s+’, ‘ ’)


EMP_NAME RETURN VALUE
Page brown Page brown
Osborne Osborn
NULL NULL
Sawyer H Sawyer H

INTERNAL
INTERNAL

REPLACECHR ( 1, CODE, 'A', 'M' )


CODE RETURN VALUE
ABA MBM
abA abM
NULL NULL
REPLACECHR ( 0, CODE, 'A', 'M' )
CODE RETURN VALUE
ABA MBM
abA MbM

REPLACESTR ( 1, TITLE, 'rs.', 'iss', 's.' )


Title ReturnValue
Mrs. Ms.
Miss Ms.
Mr. Mr.
NULL NULL

REVERSE( CUSTOMER_CODE )
CUSTOMER_CODE RETURN VALUE
0001 1000
0034 3400

ROUND( DATE_SHIPPED, 'Y' )


Jan 15 1998 2:10:30AM Jan 1 1998 12:00:00.000000000AM
Dec 20 1998 3:29:55PM Jan 1 1999 12:00:00.000000000AM
ROUND( DATE_SHIPPED, 'MM' )
Jan 15 1998 2:10:30AM Jan 1 1998 12:00:00.000000000AM
Dec 20 1998 3:29:55PM Jan 1 1999 12:00:00.000000000AM
ROUND( DATE_SHIPPED, 'D' )
Jan 15 1998 2:10:31AM Jan 15 1998 2:00:00.000000000AM
Dec 31 1998 11:59:59PM Jan 1 1999 12:00:00.000000000AM

ROUND(ITEM_PRICE,3)
ITEM_PRICE Return value
12.9936 12.994
NULL NULL
-18.8652 -18.865

RPAD( ITEM_NAME, 10,'*.*')


ITEM_NAME RETURN VALUE
Page Page*.**.*
Osborne Osborne*.*
NULL NULL
Sawyer Sawyer*.**
H. Bender H. Bender*.

INTERNAL
INTERNAL

RTRIM( LAST_NAME, 're')


LAST_NAME RETURN VALUE
Page Pag
Osborne Osborn
NULL NULL
Sawyer Sawy
H. Bender H. Bend

SETCOUNTVARIABLE ($$CurrentDistributors)
(row.) DIST_ID DIST $$CurrentDistributors
(Insert) 000015 MSD Inc. 1
(update) 000015 MSD Inc. 1
(Insert) 000015 MSD Inc. 2
(Delete) 000015 MSD Inc. 1
(Insert) 000015 MSD Inc. 2

SET_DATE_PART( DATE_PROMISED, 'HH', 16 )


Jan 1 1997 12:15:56AM Jan 1 1997 4:15:56PM
SET_DATE_PART( DATE_PROMISED, 'MM', 6 )
Jan 1 1997 12:15:56AM Jun 1 1997 12:15:56AM
SET_DATE_PART( DATE_PROMISED, 'Y', 2000 )
Jan 1 1997 12:15:56AM Jan 1 2000 12:15:56AM

SETMAXVARIABLE ($$MAXPrice, PRICE) (Lets assume $


$MAXPrice from last session is 22.5)
PRICE $$MAXPrice
23.5 23.5
5.5 23.5
28.5 28.5
3.5 28.5

SETMINVARIABLE ($$MinPrice, PRICE) (Lets assume $$MinPrice


from last session is 22.5)
PRICE $$MinPrice
23.5 22.5
5.5 5.5
28.5 5.5
3.5 3.5

SETVARIABLE ($$Time, SYSDATE)


Row Detail $$Time value
1 11/27/2013 01:34:33
2 11/27/2013 01:34:34
3 11/27/2013 01:34:35
At the end of the session, the PowerCenter Integration Service
saves 11/27/2013 01:34:35 to the repository as the last
evaluated current value for $$Time.

INTERNAL
INTERNAL

SIGN( SALES )
SALES Return
100 1
-36.9 -1
0 0

SIN( DEGREES * 3.14159 / 180 )


70 0.939692620785936
NULL NULL
90 1

SINH( ANGLES )
1.0 1.1752011936438
2.897 9.03225804884884

SOUNDEX( NAME )
NAME Return
John J500
William W450

SQRT(100) Returns: 10
SQRT(-10) Returns:Error. PowerCenter Integration Service does
not write row

SUBSTR( PHONE, 1, 3 )
Phone Return value
809-555-0269 809
SUBSTR( PHONE, 5)
809-555-0269 555-0269

SUM( SALES, SALES > 20 )


SALES
100
30
60
10
Return: 190

INTERNAL
INTERNAL

Create an Expression transformation with the following ports and


values:
Order_Qty Input n/a
Time_Counter Variable ‘US’
Transaction_Id Output SYSTIMESTAMP
( Time_Counter )
Order Qty Transaction_Id
14 07/06/2007 18:00:30.701015000
3 07/06/2007 18:00:30.701029000
6 07/06/2007 18:00:30.701039000

TAN( DEGREES * 3.14159 / 180 )


70 2.74747741945531
NULL NULL

TANH( ANGLES )
1.0 0.761594155955765
2.897 0.993926947790665

TO_BIGINT( IN_TAX, TRUE )


'7245176201123435.6789' 7245176201123435
'7245176201123435.2' 7245176201123435
NULL NULL
'A12.3Grove' 0
' 176201123435.87' 176201123435
TO_BIGINT( IN_TAX )
'7245176201123435.6789' 7245176201123436
' 176201123435.87' 176201123436

TO_CHAR( DATE_PROMISED, 'MON DD YYYY' )


Apr 1 1998 12:00:10AM 'Apr 01 1998'
Feb 22 1998 01:31:10PM 'Feb 22 1998'

TO_CHAR( IN_TAX)
15.679 '15.679'
60.2 '60.2'

TO_DATE( DATE_PROMISED, 'MM/DD/YY' )


'04/01/98' 04/01/1998 00:00:00.000000000
'08/17/05' 08/17/1905 00:00:00.000000000
If you use MM/DD/RR you will get 2005 for the second row.

INTERNAL
INTERNAL

TO_DECIMAL( IN_TAX,3)
'15.6789' 15.679
'A12.3Grove' 0
'60.2' 60.200
'711A1' 711

TO_FLOAT( IN_TAX )
'15.6789' 15.6789
'A12.3Grove' 0
'60.2' 60.2

TO_INTEGER( IN_TAX, TRUE )


'15.6789' 15
'A12.3Grove' 0
TO_INTEGER( IN_TAX, FALSE )
'15.6789' 16
'A12.3Grove' 0

TRUNC(DATE_SHIPPED,'Y')
DATE_SHIPPED Return value
Jan 15 1998 2:10:30AM Jan 1 1998 12:00:00.000000000
Apr 19 1998 1:31:20PM Jan 1 1998 12:00:00.000000000
NULL NULL

TRUNC(ITEM_PRICE,3)
ITEM_PRICE Return value
12.9995 12.999
NULL NULL
-18.8652 -18.865

UPPER(ITEM_NAME)
ITEM_NAME Return value
Flashlight FLASHLIGHT
NULL NULL
SHIRISH SHIRISH

INTERNAL
INTERNAL

Comments
Stops the session, and issues a specified error message to the session log file.
Note:If you use ABORT in an expression for an unconnected port, the PowerCenter
Integration Service does not run the ABORT function.

Returns the absolute value of a numeric value.


Note: If the return value is Decimal with precision greater than 15, you can enable high
precision to ensure decimal precision up to 28 digits.

Adds a specified amount to one part of a datetime value, and returns a date in the same
format as the date you pass to the function.ADD_TO_DATE accepts positive and negative
integer values

Decrypts the binary data to string format.PowerCenter Integration Service uses FIPS-
approved cryptographic algorithm : Advanced Encryption Standard (AES) algorithm with
128-bit encoding.

Encrypts the String data to binary format.PowerCenter Integration Service uses FIPS-
approved cryptographic algorithm : Advanced Encryption Standard (AES) algorithm with
128-bit encoding.
ASCII function returns the numeric ASCII value of the first character of the string passed
to the function.

Returns the average of all values in a group of rows. Optionally, you can apply a filter to
limit the rows you read to calculate the average.
Note:You can nest only one other aggregate function within AVG, and the nested
function must return a Numeric datatype.

Returns the smallest integer greater than or equal to the numeric value passed to this
function
Note: You get Integer if you pass a numeric value with declared precision between 0 and
28.
Double if you pass a numeric value with declared precision greater than 28.

Chooses a string from a list of strings based on a given position. You specify the position
and the value. If the value matches the position, the PowerCenter Integration Service
returns the value.
Note:CHOOSE returns NULL if the expression does not contain the argument. for ex:
CHOOSE( 4, 'knife', 'flashlight', 'diving hood' ) =NULL

CHR returns the ASCII character corresponding to the numeric value you pass to this
function.
ction

Compresses data using the zlib 1.2.1 compression algorithm. Use the COMPRESS
function before you send large amounts of data over a wide area network.

Concatenates two strings. CONCAT converts all data to text before concatenating the
strings. Alternatively, use the || string operator to concatenate strings. Using the ||
string operator instead of CONCAT improves PowerCenter Integration Service
performance.
Note: You can use Any datatype except Binary

INTERNAL
INTERNAL

Converts a number from one base value to another base value.

Returns the cosine of a numeric value (expressed in radians).


Returns the hyperbolic cosine of a numeric value (expressed in radians).
Returns the number of rows that have non-null values in a group. Optionally, you can
include the asterisk (*) argument to count all input values in a transformation. You can
nest only one other aggregate function within COUNT. You can apply a condition to filter
rows before counting them.

Returns a 32-bit Cyclic Redundancy Check (CRC32) value. Use CRC32 to find data
transmission errors. You can also use CRC32 if you want to verify that data stored in a file
has not been modified.

Returns a running total. A running total means CUME returns a total each time it adds a
value. You can add a condition to filter rows out of the row set before calculating the
running total.

Returns an integer indicating which of two dates is earlier. DATE_COMPARE returns an


integer value rather than a date value.
Note: Returns:-1 if the first date is earlier. 0 if the two dates are equal. 1 if the second
date is earlier. NULL if one of the date values is NULL.

Returns the length of time between two dates. You can request the format to be years,
months, days, hours, minutes, seconds, milliseconds, microseconds, or nanoseconds.
The PowerCenter Integration Service subtracts the second date from the first date and
returns the difference.

Decodes a base 64 encoded value and returns a string with the binary data
representation of the data.

Searches a port for a value you specify. If the function finds the value, it returns a result
value, which you define. You can build an unlimited number of searches within a
DECODE function.

Decompresses data using the zlib 1.2.1 compression algorithm. Use the DECOMPRESS
function on data that has been compressed with the COMPRESS function or a
compression tool that uses the zlib 1.2.1 algorithm
Encodes data by converting binary data to string data using Multipurpose Internet Mail
Extensions (MIME) encoding.

INTERNAL
INTERNAL

Causes the PowerCenter Integration Service to skip a row and issue an error message,
which you define. The error message displays in the session log. The PowerCenter
Integration Service does not write these skipped rows to the session reject file.
Use ERROR in Expression transformations to validate data. Generally, you use ERROR
within an IIF or DECODE function to set rules for skipping rows

Returns e raised to the specified power (exponent), where e=2.71828183. For example,
EXP(2) returns 7.38905609893065

Returns the first value found within a port or group. Optionally, you can apply a filter to
limit the rows the PowerCenter Integration Service reads. You can nest only one other
aggregate function within FIRST.

Returns the largest integer less than or equal to the numeric value you pass to this
function.
Note: You get Integer if you pass a numeric value with declared precision between 0 and
28.
Double if you pass a numeric value with declared precision greater than 28.

Returns the future value of an investment, where you make periodic, constant payments
and the investment earns a constant interest rate.

Returns the specified part of a date as an integer value. Therefore, if you create an
expression that returns the month portion of the date, and pass a date such as Apr 1
1997 00:00:00, GET_DATE_PART returns 4.
Note: 12:00:00AM returns 0 because the default date format is based on the 24 hour
interval.

Returns the greatest value from a list of input values. Use this function to return the
greatest string, date, or number. By default, the match is case sensitive.
Returns value1 if it is the greatest of the input values, value2 if it is the greatest of the
input values, and so on.
NULL if any of the arguments is null.

Returns one of two values you specify, based on the results of a condition.
Note:Unlike conditional functions in some systems, the FALSE (value2) condition in the
IIF function is not required. If you omit value2, the function returns the following when
the condition is FALSE:
0 if value1 is a Numeric datatype.
Empty string if value1 is a String datatype.
NULL if value1 is a Date/Time datatype

INTERNAL
INTERNAL

Matches input data to a list of values. By default, the match is case sensitive.
Note: When CaseFlag is a number other than 0, the function is case sensitive.
When CaseFlag is a null value or 0, the function is not case sensitive.

Finds the index of a value among a list of values. By default, the match is case sensitive.
Note: When CaseFlag is a number other than 0, the function is case sensitive.
When CaseFlag is a null value or 0, the function is not case sensitive.

Capitalizes the first letter in each word of a string and converts all other letters to
lowercase. Words are delimited by white space (a blank space, formfeed, newline,
carriage return, tab, or vertical tab) and characters that are not alphanumeric. For
example, if you pass the string ‘…THOMAS’, the function returns Thomas.

Returns the position of a character set in a string, counting from left to right.

Returns whether a value is NULL. ISNULL evaluates an empty string as FALSE.


Note: To test for empty strings, use LENGTH.

Returns whether a string value is a valid date. A valid date is any string in the date
portion of the date time format specified in the session. If the string you want to test is
not in this date format, use the TO_DATE format string to specify the date format. If the
strings passed to IS_DATE do not match the format string specified, the function returns
FALSE (0). If the strings match the format string, the function returns TRUE (1).
IS_DATE evaluates strings and returns an integer value.
Note: IS_DATE uses the same format strings as TO_DATE.

INTERNAL
INTERNAL

Returns whether a string is a valid number. A valid number consists of the following
parts:
Optional space before the number
Optional sign (+/-)
One or more digits with an optional decimal point
Optional scientific notation, such as the letter ‘e’ or ‘E’ (and the letter ‘d’ or ‘D’ on
Windows) followed by an optional sign (+/-), followed by one or more digits
Optional white space following the number

Returns whether a string value consists entirely of spaces. A space is a blank space, a
formfeed, a newline, a carriage return, a tab, or a vertical tab.
IS_SPACES evaluates an empty string as FALSE because there are no spaces. To test for
an empty string, use LENGTH.
Note: Return :TRUE (1) if the row consists entirely of spaces.
FALSE (0) if the row contains data.
NULL if a value in the expression is NULL.

Returns the last row in the selected port. Optionally, you can apply a filter to limit the
rows the PowerCenter Integration Service reads. You can nest only one other aggregate
function within LAST.

Returns the date of the last day of the month for each date in a port.

Returns the smallest value from a list of input values. By default, the match is case
sensitive.
Returns value1 if it is the least of the input values, value2 if it is the least of the input
values, and so on.
NULL if any of the arguments is null.

Returns the number of characters in a string, including trailing blanks.

Returns the natural logarithm of a numeric value. For example, LN(3) returns 1.098612.
You usually use this function to analyze scientific data rather than business data.
This function is the reciprocal of the function EXP.

INTERNAL
INTERNAL

Returns the logarithm of a numeric value. Most often, you use this function to analyze
scientific data rather than business data.

you use the LOOKUP function in a mapping, you need to enable the lookup caching option for 3.5
t to continue using the LOOKUP function, rather than creating Lookup transformations.

Converts uppercase string characters to lowercase.

Converts a string to a specified length by adding blanks or characters to the beginning of


the string.
If you omit the second string, the function pads the start of the first string with blanks.

Removes blanks or characters from the Start of a string.


If you do not specify a trim_set parameter in the expression:
In UNICODE mode, LTRIM removes both single- and double-byte spaces from the end of
a string.
In ASCII mode, LTRIM removes only single-byte spaces.

Returns the date and time based on the input values.


First 3 argumants year,Month,Day are necessary and rest are optional.

Returns the latest date found within a port or group. You can apply a filter to limit the
rows in the search. You can nest only one other aggregate function within MAX.

Returns the maximum numeric value found within a port or group. You can apply a filter
to limit the rows in the search. You can nest only one other aggregate function within
MAX.

Returns the highest string value found within a port or group. You can apply a filter to
limit the rows in the search. You can nest only one other aggregate function within MAX.
Note: The MAX function uses the same sort order that the Sorter transformation uses.
However, the MAX function is case sensitive, and the Sorter transformation may not be
case sensitive.

INTERNAL
INTERNAL

Calculates the checksum of the input value. The function uses Message-Digest algorithm
5 (MD5). MD5 is a one-way cryptographic hash function with a 128-bit hash value. You
can conclude that input values are different when the checksums of the input values are
different. Use MD5 to verify data integrity.
Note:You can use the return value as a hash key.

Returns the median of all values in a selected port.


If there is an even number of values in the port, the median is the average of the middle
two values when all values are placed ordinally on a number line. If there is an odd
number of values in the port, the median is the middle number.
You can nest only one other aggregate function within MEDIAN, and the nested function
must return a Numeric datatype.
The PowerCenter Integration Service reads all rows of data to perform the median
calculation. The process of reading rows of data to perform the calculation may affect
performance. Optionally, you can apply a filter to limit the rows you read to calculate the
median.

Encodes string values. You can specify the length of the string that you want to encode.
METAPHONE encodes characters of the English language alphabet (A-Z). It encodes both
uppercase and lowercase letters in uppercase.
METAPHONE encodes characters according to the following list of rules:
Skips vowels (A, E, I, O, and U) unless one of them is the first character of the input
string. METAPHONE(‘CAR’) returns ‘KR’ and METAPHONE(‘AAR’) returns ‘AR’.

Returns the earliest date found in a port or group. You can apply a filter to limit the rows
in the search. You can nest only one other aggregate function within MIN, and the
nested function must return a date datatype.

Returns the smallest numeric value found in a port or group. You can apply a filter to
limit the rows in the search. You can nest only one other aggregate function within MIN,
and the nested function must return a numeric datatype.

Returns the lowest string value found in a port or group. You can apply a filter to limit
the rows in the search. You can nest only one other aggregate function within MIN, and
the nested function must return a string datatype.
Note: The MIN function uses the same sort order that the Sorter transformation uses.
However, the MIN function is case sensitive, but the Sorter transformation may not be
case sensitive.

INTERNAL
INTERNAL

Returns the remainder of a division calculation.


The row (25, 0) produced an error because you cannot divide by 0. To avoid dividing by
0, you can create an expression similar to the following, which returns the modulus of
Price divided by Quantity only if the quantity is not 0. If the quantity is 0, the function
returns NULL:
MOD( PRICE, IIF( QTY = 0, NULL, QTY ))

Returns the average (row-by-row) of a specified set of rows. Optionally, you can apply a
condition to filter rows before calculating the moving average.
Note: If you mention filter condition as 5 you see first 4 values as NULL since
MOVINGAVG function returns a value after it reads 5 rows. 6 th row you will get the
average of 2nd row to 6th row and for 7 the row avg of 3rd to 7th row and so on.

Returns the sum (row-by-row) of a specified set of rows.


Optionally, you can apply a condition to filter rows before calculating the moving sum.
Note: If you mention filter condition as 5 you see first 4 values as NULL since
MOVINGSUM function returns a value after it reads 5 rows. 6 th row you will get the
sum of 2nd row to 6th row and for 7 the row sum of 3rd to 7th row and so on.

Returns the number of periods for an investment based on a constant interest rate and
periodic, constant payments.
Note:To calculate interest rate earned in each period, divide the annual rate by the
number of payments made in an year. For example, if you make monthly payments at an
annual interest rate of 15 percent, the value of the Rate argument is 15% divided by 12.
If you make annual payments, the value of the Rate argument is 15%.
The payment value and present value are negative because these are amounts that you
pay.

Calculates the value that falls at a given percentile in a group of numbers. You can nest
only one other aggregate function within PERCENTILE, and the nested function must
return a Numeric datatype.
The PowerCenter Integration Service reads all rows of data to perform the percentile
calculation. The process of reading rows to perform the calculation may affect
performance. Optionally, you can apply a filter to limit the rows you read to calculate the
percentile.

Returns the payment for a loan based on constant payments and a constant interest
rate.
Notes
To calculate interest rate earned in each period, divide the annual rate by the number of
payments made in a year. For example, if you make monthly payments at an annual
interest rate of 15%, the rate is 15%/12. If you make annual payments, the rate is 15%.
The payment value is negative because these are amounts that you pay.

INTERNAL
INTERNAL

Returns a value raised to the exponent you pass to the function.


Note:The value -3.0 raised to 6 returns the same results as -3.0 raised to 5.5. If the base
is negative, the exponent must be an integer. Otherwise, the PowerCenter Integration
Service rounds the exponent to the nearest integer value.

Returns the present value of an investment.

Returns a random number between 0 and 1. This is useful for probability scenarios.
Note: Seed Value must be a constant. If you do not enter a seed, the PowerCenter
Integration Service uses the current system time to derive the numbers of seconds since
January 1, 1971. It uses this value as the seed.

Returns the interest rate earned per period by a security.

Extracts subpatterns of a regular expression within an input value. For example, from a
regular expression pattern for a full name, you can extract the first name or last name.
Note: Use the REG_REPLACE function to replace a character pattern in a string with
another character pattern.

Returns whether a value matches a regular expression pattern. This lets you validate
data patterns, such as IDs, telephone numbers, postal codes, and state names.
Note: Use the REG_REPLACE function to replace a character pattern in a string with a
new character pattern.
You can also use REG_MATCH for the following tasks:
To verify that a value matches a pattern. This use is similar to the SQL LIKE function.
To verify that values are characters. This use is similar to the SQL IS_CHAR function.

Replaces characters in a string with another character pattern. By default, REG_REPLACE


searches the input string for the character pattern you specify and replaces all
occurrences with the replacement pattern. You can also indicate the number of
occurrences of the pattern you want to replace in the string.

INTERNAL
INTERNAL

Replaces characters in a string with a single character or no character. REPLACECHR


searches the input string for the characters you specify and replaces all occurrences of
all characters with the new character you specify.

Replaces characters in a string with a single character, multiple characters, or no


character. REPLACESTR searches the input string for all strings you specify and replaces
them with the new string you specify.

Reverses the input string.

Rounds one part of a date.


Year. Rounds the year portion of a date based on the month.
Month. Rounds the month portion of a date based on the day of the month.
Day. Rounds the day portion of the date based on the time.
Hour. Rounds the hour portion of the date based on the minutes in the hour.
Minute. Rounds the minute portion of the date based on the seconds.
Second. Rounds the second portion of the date based on the milliseconds.
Millisecond. Rounds the millisecond portion of the date based on the microseconds.
Microsecond. Rounds the microsecond portion of the date based on the nanoseconds.

Rounds numbers to a specified number of digits or decimal places.

Converts a string to a specified length by adding blanks or characters to the end of the
string.
If you omit the second string, the function pads the end of the first string with blanks.

INTERNAL
INTERNAL

Removes blanks or characters from the end of a string.


If you do not specify a trim_set parameter in the expression:
In UNICODE mode, RTRIM removes both single- and double-byte spaces from the end of
a string.
In ASCII mode, RTRIM removes only single-byte spaces.

Counts the rows evaluated by the function and increments the current value of a
mapping variable based on the count. Increases the current value by one for each row
marked for insertion. Decreases the current value by one for each row marked for
deletion. Keeps the current value the same for each row marked for update or reject.
Returns the new current value.
Note:Use the SETCOUNTVARIABLE function only once for each mapping variable in a
pipeline.Use mapping variables with a count aggregation type.

Sets one part of a Date/Time value to a value you specify. With SET_DATE_PART, you can
change the following parts of a date.
Year,Month,Day,Hour,Minute,Seconds,Milli ,Micro,Nano Seconds.
Note:If you want to change multiple parts of a date at one time, you can nest multiple
SET_DATE_PART functions within the date argument. For example, you might write the
following expression to change all of the dates in the DATE_ENTERED port to July 1 1998:
SET_DATE_PART( SET_DATE_PART( SET_DATE_PART( DATE_ENTERED, 'YYYY', 1998),MM',
7), 'DD', 1)

Sets the current value of a mapping variable to the lower of two values: the current
value of the variable or the value you specify. Returns the new current value. The
SETMAXVARIABLE function executes only if a row is marked as insert. SETMAXVARIABLE
ignores all other row types and the current value remains unchanged.
Note: Use the SETMAXVARIABLE function only once for each mapping variable in a
pipeline.Use mapping variables with Max aggregation type.

Sets the current value of a mapping variable to the lower of two values: the current
value of the variable or the value you specify. Returns the new current value. The
SETMINVARIABLE function executes only if a row is marked as insert. SETMINVARIABLE
ignores all other row types and the current value remains unchanged.
Note: Use the SETMINVARIABLE function only once for each mapping variable in a
pipeline.Use mapping variables with Min aggregation type

Sets the current value of a mapping variable to a value you specify. Returns the specified
value. The SETVARIABLE function executes only if a row is marked as insert or update.
SETVARIABLE ignores all other row types and the current value remains unchanged.
Note: Use the SETVARIABLE function only once for each mapping variable in a pipeline.
SETVARIABLE($$test,NULL) will assign the latest value to $$test

INTERNAL
INTERNAL

Returns whether a numeric value is positive, negative, or 0.


Note: -1 for negative values.
0 for 0.
1 for positive values.
NULL if NULL

Returns the SIN of a numeric value (expressed in radians).

Returns the hyperbolic SIN of the numeric value passed to this function.

Encodes a string value into a four-character string.


SOUNDEX works for characters in the English alphabet (A-Z). It uses the first character of
the input string as the first character in the return value and encodes the remaining
three unique consonants as numbers.
SOUNDEX encodes characters according to the following list of rules:
1. Uses the first character in string as the first character in the return value and encodes
it in uppercase. For example, both SOUNDEX(‘John’) and SOUNDEX(‘john’) return ‘J500’.
2. Encodes the first three unique consonants following the first character in string and
ignores the rest. For example, both SOUNDEX(‘JohnRB’) and SOUNDEX(‘JohnRBCD’)
return ‘J561’.
3.Assigns a single code to consonants that sound alike.

Returns the square root of a non-negative numeric value.

Returns the standard deviation of the numeric values you pass to this function. STDDEV
is used to analyze statistical data. You can nest only one other aggregate function within
STDDEV, and the nested function must return a Numeric datatype.

Returns a portion of a string. SUBSTR counts all characters, including blanks, starting at
the beginning of the string.

Returns the sum of all values in the selected port. Optionally, you can apply a filter to
limit the rows you read to calculate the total. You can nest only one other aggregate
function within SUM, and the nested function must return a Numeric datatype.

INTERNAL
INTERNAL

Returns the current date and time of the node hosting the PowerCenter Integration
Service with precision to the nanosecond. The precision to which you display the date
and time depends on the platform.
The return value of the function varies depending on how you configure the argument:
When you configure the argument of SYSTIMESTAMP as a variable, the PowerCenter
Integration Service evaluates the function for each row in the transformation.
When you configure the argument of SYSTIMESTAMP as a constant, the PowerCenter
Integration Service evaluates the function once and retains the value for each row in the
transformation.

Returns the tangent of a numeric value (expressed in radians).

Returns the hyperbolic tangent of the numeric value passed to this function.

Converts a string or numeric value to a bigint value. TO_BIGINT syntax contains an


optional argument that you can choose to round the number to the nearest integer or
truncate the decimal portion. TO_BIGINT ignores leading blanks.
Note:TO_BIGINT truncates the decimal portion when the flag is TRUE or a number other
than 0.
TO_BIGINT rounds the value to the nearest integer if the flag is FALSE or 0 or if you omit
this argument.
The flag is not set by default.

Converts dates to character strings. You can convert the date into any format using the
TO_CHAR format strings.
Note: If you omit the format argument, TO_CHAR returns a string in the date format
specified in the session, by default, MM/DD/YYYY HH24:MI:SS.US:
In TO_CHAR, format D returns day of the week, DAY >> name of the day
DD >>Day of the Month and DDD >>Day of the year.Similarly W>>Week of the month
and WW>>Week of the year respectively.

Converts numeric values to text strings.


Converts double values to strings of up to 16 digits and provides accuracy up to 15 digits.
If you pass a number with more than 15 digits, TO_CHAR rounds the number to the
sixteenth digit.

Converts a character string to a Date/Time datatype. You use the TO_DATE format strings
to specify the format of the source strings.
The output port must be Date/Time for TO_DATE expressions.
If you are converting two-digit years with TO_DATE, use either the RR or YY format
string. Do not use the YYYY format string

INTERNAL
INTERNAL

Converts a string or numeric value to a decimal value. TO_DECIMAL ignores leading


blanks.
Note: If the string contains a non-numeric character, converts the numeric portion of the
string up to the first non-numeric character.
If the first character is non-numeric, returns 0.

Converts a string or numeric value to a double-precision floating point number (the


Double datatype). TO_FLOAT ignores leading blanks.

Converts a string or numeric value to an integer. TO_INTEGER syntax contains an


optional argument that you can choose to round the number to the nearest integer or
truncate the decimal portion. TO_INTEGER ignores leading blanks
Note:TO_INTEGER truncates the decimal portion when the flag is TRUE or a number
other than 0.
TO_INTEGER rounds the value to the nearest integer if the flag is FALSE or 0 or if you
omit this argument.

Truncates dates to a specific year, month, day, hour, minute, second, millisecond, or
microsecond.

Truncates numbers to a specific digit.


Note: If precision is a positive integer, TRUNC returns numeric_value with the number of
decimal places specified by precision. If precision is a negative integer, TRUNC changes
the specified digits to the left of the decimal point to zeros. If you omit the precision
argument, TRUNC truncates the decimal portion of numeric_value and returns an
integer.

Converts lowercase string characters to uppercase.

Returns the variance of a value you pass to it. VARIANCE is used to analyze statistical
data. You can nest only one other aggregate function within VARIANCE, and the nested
function must return a Numeric datatype.

INTERNAL

You might also like