Search For

To_Decimal - Convert To Decimal

Flag Hide Line Nos
Flagging a Snippet, takes the snippet to Moderator Attention;


0
The TO_DECIMAL function converts any value (except binary) to a decimal.

Syntax
TO_DECIMAL( value [, scale ] )

Example : Decimal Conversion with 3 as scale
TO_DECIMAL( AVERAGE, 3 )
IN_TAX         RETURN VALUE
'10.3487'        10.349
'5.2'            5.200
'85.5784'         85.578
'A12.3Stud'     0

If incompatible decimal i.e string in the above example is provided as Input, Informatica returns 0.
Vote! You feel this code is working like charm ? Go a head Login and Press up arrow.
Didn't work ?, press down arrow and let us know the error in comments

Comments