Академический Документы
Профессиональный Документы
Культура Документы
Type
Functions
AVG COUNT FIRST LAST MAX ( ate! MAX (Nu"#er! MAX (String! ME IAN MIN ( ate! MIN (Nu"#er! MIN (String! $ERCENTILE ST EV SUM VARIANCE ASCII C&R C&RCO E CONCAT INITCA$ INSTR LENGT& LO'ER L$A LTRIM META$&ONE RE$LACEC&R RE$LACESTR R$A RTRIM SOUN EX SU(STR U$$ER TO*(IGINT TO*C&AR(Nu"#er! TO* ATE TO* ECIMAL TO*FLOAT TO*INTEGER GREATEST IN INSTR IS* ATE
Aggregate Functions
C%aracter Functions
Con)ersion Functions
INTERNAL
INTERNAL IS*NUM(ER IS*S$ACES ISNULL LEAST LTRIM META$&ONE REG*EXTRACT REG*MATC& REG*RE$LACE RE$LACEC&R RE$LACESTR RTRIM SOUN EX SU(STR TO*(IGINT TO*C&AR TO* ATE TO* ECIMAL TO*FLOAT TO*INTEGER A *TO* ATE ATE*COM$ARE ATE* IFF GET* ATE*$ART IS* ATE LAST* A, MA-E* ATE*TIME MAX MIN ROUN ( ate! SET* ATE*$ART S,STIMESTAM$ TO*C&AR( ate! TRUNC( ate! AES* ECR,$T AES*ENCR,$T COM$RESS CRC/0 EC*(ASE12 ECOM$RESS ENC*(ASE12 M 3 FV N$ER $MT INTERNAL
ate Functions
Enco.ing Functions
Financia+ Functions
INTERNAL Financia+ Functions $V RATE A(S CEIL CONV CUME EX$ FLOOR LN LOG MAX MIN MO MOVINGAVG MOVINGSUM $O'ER RAN ROUN SIGN S4RT TRUNC COS COS& SIN SIN& TAN TAN& A(ORT ECO E ERROR IIF LOO-U$ C&OOSE IN EXOF MAX MIN REVERSE ISNULL IS* ATE IS*NUM(ER IS*S$ACES SetCountVaria#+e SetMa6Varia#+e SetMinVaria#+e SetVaria#+e INTERNAL
Nu"eric Functions
Scienti5ic Functions
Specia+ Functions
String Functions
Test Functions
Varia#+e Functions
A(ORT
A(ORT( string !
string
A(S
A(S( nu"eric*)a+ue !
Nu"eric($ositi)e!
*TO* ATE
AES* ECR,$T
AES*ENCR,$T ASCII
AVG
CEIL
CEIL( nu"eric*)a+ue !
Nu"eric
String String
COM$RESS
COM$RESS( )a+ue !
(inary
CONCAT
String
INTERNAL
INTERNAL CONVERT*(ASE( )a+ue7 source*#ase7 .est*#ase ! Nu"eric COS( nu"eric*)a+ue ! ou#+e COS( nu"eric*)a+ue ! ou#+e COUNT( )a+ue 795i+ter*con.ition: ! or COUNT( = 79 5i+ter*con.ition: !
COUNT
Nu"eric
CRC/0
CRC/0( value )
Integer
CUME
ATE*COM$ARE
Integer
ou#+e (inary
ECO E
ECOM$RESS ENC*(ASE12
(inary string
INTERNAL
INTERNAL
ERROR EX$
String ou#+e
FIRST
FLOOR FV
Nu"eric Nu"eric
GET* ATE*$ART
Nu"eric
GREATEST
IIF
INTERNAL
INTERNAL
IN
IN EXOF
Nu"eric
INITCA$
INITCA$( string !
INSTR
Nu"eric
ISNULL
ISNULL( value )
;(True! or >(Fa+se!
IS* ATE
INTERNAL
INTERNAL
IS*NUM(ER
String?Nu"eric
IS*S$ACES
LAST
LAST* A,
ate
LEAST LENGT&
LN
LN( nu"eric*)a+ue !
ou#+e
INTERNAL
INTERNAL
LOG LOO-U$
ou#+e
Use t%e Loo8up trans5or"ation rat%er t%an t%e LOO-U$ 5unction to +oo8 up )a+ues in co"pati#i+ity in t%e session properties< T%is option e6ists e6press+y 5or $o@
LO'ER
LO'ER( string !
String
L$A
String
LTRIM
String
MA-E* ATE*TIME
ate as MA-E* ATE*TIME( year7 "ont%7 .ay7 MM? ?,,,, %our7 "inute7 secon.7 nanosecon. ! &&02AMIASS
MAX ( ates!
ate
MAX (Nu"#ers!
MAX (String!
String
INTERNAL
INTERNAL
M 3
M 3( )a+ue !
ME IAN
Nu"eric
META$&ONE
String
MIN ( ates!
ate
MIN (Nu"#ers!
MIN (String!
String
INTERNAL
INTERNAL
MO
MO ( nu"eric*)a+ue7 .i)isor !
Nu"eric
MOVINGAVG
MOVINGSUM
N$ER
Nu"eric
$ERCENTILE
Nu"eric
$MT
INTERNAL
INTERNAL
$O'ER $V
ou#+e
RAN RATE
RAND( seed ) RATE( terms, payment, present value[, future value, type )
Nu"eric Nu"eric
REG*EXTRACT
String
REG*MATC&
True?FALSE?NULL
REG*RE$LACE
String
INTERNAL
INTERNAL
RE$LACEC&R
String
RE$LACESTR
REVERSE
REVERSE( string !
String
ROUN ( ates!
ate
ROUN (Nu"#ers!
Nu"eric
R$A
String
INTERNAL
INTERNAL
RTRIM
String
SET* ATE*$ART
ate
SETMAXVARIA(LE
SETMINVARIA(LE
SETVARIA(LE
INTERNAL
INTERNAL
SIGN
SIGN( nu"eric*)a+ue !
Integer
SIN
SIN( nu"eric*)a+ue !
ou#+e
SIN&
SIN&( nu"eric*)a+ue !
ou#+e
SOUN EX
"O!NDE#( string )
String
S4RT
ou#+e
ST
EV
Nu"eric
SU(STR
String
SUM
INTERNAL
INTERNAL
S,STIMESTAM$
S,STIMESTAM$( 95or"at: !
Ti"esta"p
TAN
TAN( nu"eric*)a+ue !
ou#+e
TAN&
TAN&( nu"eric*)a+ue !
ou#+e
TO*(IGINT
(igInt
TO*C&AR ( ates!
String
TO*C&AR (Nu"#ers!
TO*C&AR( nu"eric*)a+ue !
String
TO* ATE
ate
INTERNAL
INTERNAL
TO* ECIMAL
eci"a+
TO*FLOAT
TO*FLOAT( )a+ue !
ou#+e
TO*INTEGER
Integer
TRUNC ( ates!
ate
TRUNC (Nu"#ers!
Nu"eric
U$$ER
String
VARIANCE
ou#+e
INTERNAL
INTERNAL Ex:
A(S( ;>> C 0>> ! H;>> A *TO* ATE (GKan ;0 ;DDL 0A>>A/>AM G7 GMMG7 ; ! HFe# ;0 ;DDL ;0A>>A/>AM
CEIL(/D<ID!H2> 7 CEIL(C;>><DD!HC;>>
C&OOSE( 07 G8ni5eG7 G5+as%+ig%tG7 G.i)ing %oo.G ! H G5+as%+ig%tG C&R(13!HGAG 7 C&R(;00!HGJG Sa"e as ASCII Function T%e source contains a ro@ t%at is ;> M(< ,ou can co"press t%e .ata in t%is ro@ using COM$RESS< '%en you co"press t%e .ata7 you .ecrease t%e a"ount o5 .ata t%e $o@erCenter Integration Ser)ice @rites o)er t%e net@or8< As a resu+t7 you "ay increase per5or"ance<
CONCAT(GS&IRIS&G7GGANTAG!HGS&IRIS&GANTAG
INTERNAL
INTERNAL
CUME( $ERSONAL*SALES !C For e6A 2>>> 2>>> />>> I>>> ;>>> L>>>
ATE* IFF( ATE*$ROMISE 7 ATE*S&I$$E 7 G G ! Kan ; ;DDI ;0A>>A>>AM 7 Mar 0D ;DDI ;0A>>A>>$M H CLI<3
ECO E ( CONST*NAME GFi)eG7 37 G$yt%agorasG7 ;<2;20;/3107 GArc%i"e.esG7 /<;2;3D01327 G$iG7 /<;2;3D0132 ! ECO E( TRUE7 Var; H 007 GVaria#+e ; @as 00OG7 Var0 H 2D7 GVaria#+e 0 @as 2DOG7 Var; N 0/7 GVaria#+e ; @as +ess t%an 0/<G7 Var0 P />7 GVaria#+e 0 @as "ore t%an /><G7 GVaria#+es @ere out o5 .esire. ranges<G!
INTERNAL
INTERNAL
IIF( SALAR, N >7 ERROR (GError< Negati)e sa+ary 5oun.< Ro@ s8ippe.<G7 EM$*SALAR, ! EX$(;>!H00>01<213ID2L>1I FIRST( ITEM*NAME7 ITEM*$RICE N ;> ! ITEM*NAME ITEM*$RICE F+as%+ig%t /3<>> Na)igation Co"pass L<>3 Regu+ator Syste" ;3><>> F+as%+ig%t 0D<>> RETURN VALUEA Na)igation Co"pass
F+oor(/D<ID!H/D 7 F+oor(C;>><DD!HC;>; FV(><>>I37 ;07 C03>7 C0>>>7 TRUE!HF37//I<D1 GET* ATE*$ART( ATE*S&I$$E 7 G,G ! Kan ;3 ;DDL 0A;>A/>AM ;DDL ec 0> ;DDD /A0DA33$M ;DDD GET* ATE*$ART( ATE*S&I$$E 7 GMMG ! Kan ;3 ;DDL 0A;>A/>AM ; ec 0> ;DDL /A0DA33$M ;0 GET* ATE*$ART( ATE*S&I$$E 7 G G ! Kan ;3 ;DDL 0A;>A/;AM ;3 ec /; ;DDL ;;A3DA3D$M /;
IIF( SALES P ;>>7 EM$*NAME ! Sa+es E"p*na"e Return )a+ue ;3> S%iris% S%iris% DD Ganta GG (E"pty String! NULL RaEu GG (E"pty String!
INTERNAL
INTERNAL
IN( ITEM*NAME7 QC%ise+ $oint -ni5eR7 QMe.iu" Titaniu" -ni5eR7 QSa5ety -ni5eR7 > ! ITEM*NAME RETURN VALUE F+as%+ig%t > (Fa+se! NULL NULL Sa5ety -ni5e ; (True!
IN EXOF( ITEM*NAME7 Q.i)ing %oo.R7 Q5+as%+ig%tR7 Qsa5ety 8ni5eR! ITEM*NAME RETURN VALUE 5+as%+ig%t 0 NULL NULL sa5ety -ni5e / Sa5ety -ni5e > INITCA$(ITEM*NAME! ITEM*NAME 5+as% +ig%t NULL ;LCa+#ert SOSAM
INSTR( ITEM*NAME7 GaG ! ITEM*NAME RETURN VALUE 5+as%+ig%t / NULL NULL sa5ety -ni5e 0 ISNULL( ITEM*NAME ! ITEM*NAME RETURN VALUE F+as%+ig%t > (Fa+se! NULL ; (True! GG > (Fa+se!
IS* ATE( INVOICE* ATE7 G,,,,?MM? INVOICE* ATE RETURN VALUE G>2?>;?DLG > (Fa+se! NULL NULL G;DDL?>;?;0G ; (TRUE!
G!
INTERNAL
INTERNAL
IS*NUM(ER( ITEM*$RICE ! ITEM*$RICE RETURN VALUE Ga#cG > (Fa+se! NULL NULL G;0/G ; (TRUE! G0LD G ;(TRUE!
IS*S$ACES( ITEM*NAME ! ITEM*NAME RETURN VALUE F+as%+ig%t > (Fa+se! ; (True! LAST( ITEM*NAME7 ITEM*$RICE P ;> ! ITEM*NAME ITEM*$RICE F+as%+ig%t /3<>> Na)igation Co"pass L<>3 Regu+ator Syste" ;3><>> F+as%+ig%t 0D<>> RETURN VALUEA F+as%+ig%t LAST* A,( OR ER* ATE ! Kan ;3 ;DDL 0A;>A/>AM Kan /; ;DDL ;0A>>A>>AM ec 0> ;DDL /A0DA33$M ec /; ;DDL ;0A>>A>>AM LAST* A,( TO* ATE( OR ER* ATE7 G CMONC,,G !! G>;CKanCDLG Kan /; ;DDL ;0A>>A>> AM NULL NULL G;LCFE(CD1G Fe# 0D ;DD1 >>A>>A>> (Leap year!
LEAST( 4UANTIT,;7 4UANTIT,07 4UANTIT,/ ! ;3> 7I3170/ ReturnsA 0/ LENGT&( CUSTOMER*NAME ! e6A(ernice a)isH ;/ LN( NUM(ERS ! Nu"#ers ;> ;03 NULL Return 0</>03L3>D0DD2 2<L0L/;/I/I/>0 NULL
INTERNAL
INTERNAL
LOO-U$ 5unction to +oo8 up )a+ues in $o@erCenter "appings< I5 you use t%e LOO-U$ 5unction in a "apping7 you nee. to ena ies< T%is option e6ists e6press+y 5or $o@erMart /<3 users @%o @ant to continue using t%e LOO-U$ 5unction7 rat%er t%an creatin LO'ER(ITEM*NAME! ITEM*NAME FLAS&LIG&T NULL S&IRIS& Return )a+ue 5+as%+ig%t NULL s%iris%
L$A ( ITEM*NAME7 ;>7G=<=G! ITEM*NAME RETURN VALUE $age =<==<=$age Os#orne =<=Os#orne NULL NULL Sa@yer =<==Sa@yer &< (en.er =<&< (en.er LTRIM( LAST*NAME7 GS<G! ITEM*NAME RETURN VALUE NULL NULL S< Mac ona+. Mac ona+. Sa@yer a@yer Stea."an tea."an MA-E* ATE*TIME( SALE*,EAR7 SALE*MONT&7 SALE* A,7 SALE*&OUR7 SALE*MIN7 SALE*SEC ! 0>;/ ;; 0L 0 0/ /2 ReturnA ;;?0L?0>;/ >0A0/A/2 MAX( OR ER ATE7 ITEM*NAMEHGF+as%+ig%tG ! T%e a#o)e e6pression returns t%e "a6i"u" or.er .ate 5or 5+as%+ig%ts< MAX( $RICE7 ITEM*NAMEHGF+as%+ig%tG ! T%e a#o)e e6pression returns t%e "a6i"u" price 5or 5+as%+ig%ts<
MAX( ITEM*NAME7MANUFACTURER*I HG;>2G ! T%e a#o)e e6pression returns t%e "a6i"u" ite"*na"e 5or Manu5acture*i. ;>2<
INTERNAL
INTERNAL
,ou @ant to @rite c%ange. .ata to a .ata#ase< Use M 3 to generate c%ec8su" )a+ues 5or ro@s o5 .ata you rea. 5ro" a source< '%en you run a session7 co"pare t%e pre)ious+y generate. c%ec8su" )a+ues against t%e ne@ c%ec8su" )a+ues< T%en7 @rite t%e ro@s @it% up.ate. c%ec8su" )a+ues to t%e target< ,ou can conc+u.e t%at an up.ate. c%ec8su" )a+ue in.icates t%at t%e .ata %as c%ange.<
ME IAN( SALES7 ITEM H GSta#i+iJing VestG ! T%e a#o)e e6pression returns t%e "e.ian )a+ue 5or or.ers o5 sta#i+iJing )ests<
META$&ONE( EM$LO,EE*NAME7 2 ! E"p+oyee*Na"e Return Va+ue Ko%n K&N ;A(C A(=TUF NULL $FVVocWW-MNL $--M T%e 5o++o@ing e6pression returns t%e o+.est or.er .ate 5or 5+as%+ig%tsA MIN( OR ER* ATE7 ITEM*NAMEHGF+as%+ig%tG ! T%e 5o++o@ing e6pression returns t%e "ini"u" price 5or 5+as%+ig%tsA MIN ( $RICE7 ITEM*NAMEHGF+as%+ig%tG !
T%e 5o++o@ing e6pression returns t%e "ini"u" ite" na"e 5or "anu5acturer I ;>2A MIN ( ITEM*NAME7 MANUFACTURER*I HG;>2G !
INTERNAL
INTERNAL
MO ( $RICE7 4T, ! $RICE 4T, ;><>> 0 ;0<>> 3 03 > NULL / 0><>> NULL
T%e 5o++o@ing e6pression returns t%e a)erage or.er 5or a Sta#i+iJing Vest7 #ase. on t%e 5irst 5i)e ro@s in t%e Sa+es port7 an. t%erea5ter7 returns t%e a)erage 5or t%e +ast 5i)e ro@s rea.A MOVINGAVG( SALES7 3 !
T%e 5o++o@ing e6pression returns t%e su" o5 or.ers 5or a Sta#i+iJing Vest7 #ase. on t%e 5irst 5i)e ro@s in t%e Sa+es port7 an. t%erea5ter7 returns t%e a)erage 5or t%e +ast 5i)e ro@s rea.A MOVINGSUM( SALES7 3 !
T%e 5o++o@ing e6pression returns D as t%e nu"#er o5 perio.s 5or @%ic% you nee. to "a8e t%e pay"entsA N$ER( ><>;7 C0>>>7 C3>>7 0>>>>7 TRUE !
T%e 5o++o@ing e6pression returns t%e sa+ary t%at 5a++s at t%e I3t% percenti+e o5 sa+aries greater t%an F3>7>>>A $ERCENTILE( SALAR,7 I37 SALAR, P 3>>>> !
$MT( ><>;7 ;>7 0>>>> ! returnsAC0;;;<12 as t%e "ont%+y pay"ent a"ount o5 a +oan
INTERNAL
INTERNAL
$O'ER( NUM(ERS7 EX$ONENT ! Nu"#ers EX$ONENT RETURN ;> 0 ;>> C/ 3<3 I0D<> C/ 1 <> I0D<> NULL ;L NULL $V( ><>>I37 ;07 C3>>7 0>>>>7 TRUE ! returnsA;07302<2/
RAN (;! Sa"p+e )a+ueA><2;I>00>>2I>03I2 RATE( 2L7 C3>>7 0>>>> ! ReturnsA ><>>II as t%e "ont%+y interest rate o5 a +oan REG*EXTRACT( EM$*NAME7 G(X@Y!XsY(X@Y!XsY(X@Y!G70! EM$*NAME RETURN VALUE $age #ro@n S"it% #ro@n Kuan Car+ 5ernan.o Car+ NULL NULL Step%en Gra%a" S"it% Gra%a"
REG*MATC& ($%one*Nu"#er7 G(X.X.X.CX.X.X.CX.X.X.X.!G ! $%one Return )a+ue L>DC333C>01D TRUE L>DC333C>0 FALSE L/; 333 ;0;0/ FALSE REG*RE$LACE( EM$*NAME7 QXsYR7 Q R! EM$*NAME RETURN VALUE $age #ro@n $age #ro@n Os#orne Os#orn NULL NULL Sa@yer & Sa@yer &
INTERNAL
INTERNAL
RE$LACEC&R ( ;7 CO E7 GAG7 GMG ! CO E RETURN VALUE A(A M(M a#A a#M NULL NULL RE$LACEC&R ( >7 CO E7 GAG7 GMG ! CO E RETURN VALUE A(A M(M a#A M#M RE$LACESTR ( ;7 TITLE7 Grs<G7 GissG7 Gs<G ! Tit+e ReturnVa+ue Mrs< Ms< Miss Ms< Mr< Mr< NULL NULL REVERSE( CUSTOMER*CO E ! CUSTOMER*CO E RETURN VALUE >>>; ;>>> >>/2 /2>>
ROUN ( ATE*S&I$$E Kan ;3 ;DDL 0A;>A/>AM ec 0> ;DDL /A0DA33$M ROUN ( ATE*S&I$$E Kan ;3 ;DDL 0A;>A/>AM ec 0> ;DDL /A0DA33$M ROUN ( ATE*S&I$$E Kan ;3 ;DDL 0A;>A/;AM ec /; ;DDL ;;A3DA3D$M
7 G,G ! Kan ; ;DDL ;0A>>A>><>>>>>>>>>AM Kan ; ;DDD ;0A>>A>><>>>>>>>>>AM 7 GMMG ! Kan ; ;DDL ;0A>>A>><>>>>>>>>>AM Kan ; ;DDD ;0A>>A>><>>>>>>>>>AM 7G G! Kan ;3 ;DDL 0A>>A>><>>>>>>>>>AM Kan ; ;DDD ;0A>>A>><>>>>>>>>>AM
ROUN (ITEM*$RICE7/! ITEM*$RICE Return )a+ue ;0<DD/1 ;0<DD2 NULL NULL C;L<L130 C;L<L13 R$A ( ITEM*NAME7 ;>7G=<=G! ITEM*NAME RETURN VALUE $age $age=<==<= Os#orne Os#orne=<= NULL NULL Sa@yer Sa@yer=<== &< (en.er &< (en.er=<
INTERNAL
INTERNAL
RTRIM( LAST*NAME7 GreG! LAST*NAME RETURN VALUE $age $ag Os#orne Os#orn NULL NULL Sa@yer Sa@y &< (en.er &< (en. SETCOUNTVARIA(LE (FFCurrent istri#utors! (ro@<! IST*I IST FFCurrent istri#utors (Insert! >>>>;3 MS Inc< ; (up.ate! >>>>;3 MS Inc< ; (Insert! >>>>;3 MS Inc< 0 ( e+ete! >>>>;3 MS Inc< ; (Insert! >>>>;3 MS Inc< 0
SET* ATE*$ART( ATE*$ROMISE 7 G&&G7 ;1 ! Kan ; ;DDI ;0A;3A31AM Kan ; ;DDI 2A;3A31$M SET* ATE*$ART( ATE*$ROMISE 7 GMMG7 1 ! Kan ; ;DDI ;0A;3A31AM Kun ; ;DDI ;0A;3A31AM SET* ATE*$ART( ATE*$ROMISE 7 G,G7 0>>> ! Kan ; ;DDI ;0A;3A31AM Kan ; 0>>> ;0A;3A31AM SETMAXVARIA(LE (FFMAX$rice7 $RICE! (Lets assu"e F FMAX$rice 5ro" +ast session is 00<3! $RICE FFMAX$rice 0/<3 0/<3 3<3 0/<3 0L<3 0L<3 /<3 0L<3 SETMINVARIA(LE (FFMin$rice7 $RICE! (Lets assu"e F FMin$rice 5ro" +ast session is 00<3! $RICE FFMin$rice 0/<3 00<3 3<3 3<3 0L<3 3<3 /<3 /<3 SETVARIA(LE (FFTi"e7 S,S ATE! Ro@ etai+ FFTi"e )a+ue ; ;;?0I?0>;/ >;A/2A// 0 ;;?0I?0>;/ >;A/2A/2 / ;;?0I?0>;/ >;A/2A/3 At t%e en. o5 t%e session7 t%e $o@erCenter Integration Ser)ice sa)es ;;?0I?0>;/ >;A/2A/3 to t%e repository as t%e +ast e)a+uate. current )a+ue 5or FFTi"e<
INTERNAL
INTERNAL
Return ; C; >
SIN( EGREES = /<;2;3D ? ;L> ! I> ><D/D1D010>IL3D/1 NULL NULL D> ; SIN&( ANGLES ! ;<> 0<LDI ;<;I30>;;D/12/L D<>/003L>2LL2LL2
SOUN EX( NAME ! NAME Return Ko%n K3>> 'i++ia" '23> S4RT(;>>! ReturnsA ;> S4RT(C;>! ReturnsAError< $o@erCenter Integration Ser)ice .oes not @rite ro@
SU(STR( $&ONE7 ;7 / ! $%one Return )a+ue L>DC333C>01D L>D SU(STR( $&ONE7 3! L>DC333C>01D 333C>01D SUM( SALES7 SALES P 0> ! SALES ;>> /> 1> ;> ReturnA ;D>
INTERNAL
INTERNAL
Create an E6pression trans5or"ation @it% t%e 5o++o@ing ports an. )a+uesA Or.er*4ty Input n?a Ti"e*Counter Varia#+e QUSR Transaction*I. Output S,STIMESTAM$ ( Ti"e*Counter ! Or.er 4ty Transaction*I. ;2 >I?>1?0>>I ;LA>>A/><I>;>;3>>> / >I?>1?0>>I ;LA>>A/><I>;>0D>>> 1 >I?>1?0>>I ;LA>>A/><I>;>/D>>> TAN( EGREES = /<;2;3D ? ;L> ! I> 0<I2I2II2;D233/; NULL NULL TAN&( ANGLES ! ;<> 0<LDI TO*(IGINT( IN*TAX7 TRUE ! GI023;I10>;;0/2/3<1ILDG GI023;I10>;;0/2/3<0G NULL GA;0</Gro)eG G ;I10>;;0/2/3<LIG TO*(IGINT( IN*TAX ! GI023;I10>;;0/2/3<1ILDG G ;I10>;;0/2/3<LIG ><I1;3D2;33D33I13 ><DD/D01D2IID>113
TO*C&AR( ATE*$ROMISE 7 GMON ,,,,G ! Apr ; ;DDL ;0A>>A;>AM GApr >; ;DDLG Fe# 00 ;DDL >;A/;A;>$M GFe# 00 ;DDLG TO*C&AR( IN*TAX! ;3<1ID G;3<1IDG 1><0 G1><0G TO* ATE( ATE*$ROMISE 7 GMM? ?,,G ! G>2?>;?DLG >2?>;?;DDL >>A>>A>><>>>>>>>>> G>L?;I?>3G >L?;I?;D>3 >>A>>A>><>>>>>>>>> I5 you use MM? ?RR you @i++ get 0>>3 5or t%e secon. ro@<
INTERNAL
INTERNAL
TO* ECIMAL( IN*TAX7/! G;3<1ILDG ;3<1ID GA;0</Gro)eG > G1><0G 1><0>> GI;;A;G I;; TO*FLOAT( IN*TAX ! G;3<1ILDG ;3<1ILD GA;0</Gro)eG > G1><0G 1><0
TO*INTEGER( IN*TAX7 TRUE ! G;3<1ILDG ;3 GA;0</Gro)eG > TO*INTEGER( IN*TAX7 FALSE ! G;3<1ILDG ;1 GA;0</Gro)eG > TRUNC( ATE*S&I$$E 7G,G! ATE*S&I$$E Return )a+ue Kan ;3 ;DDL 0A;>A/>AM Kan ; ;DDL ;0A>>A>><>>>>>>>>> Apr ;D ;DDL ;A/;A0>$M Kan ; ;DDL ;0A>>A>><>>>>>>>>> NULL NULL
TRUNC(ITEM*$RICE7/! ITEM*$RICE ;0<DDD3 NULL C;L<L130 U$$ER(ITEM*NAME! ITEM*NAME F+as%+ig%t NULL S&IRIS&
Return )a+ue ;0<DDD NULL C;L<L13 Return )a+ue FLAS&LIG&T NULL S&IRIS&
INTERNAL
INTERNAL Comments Stops t%e session7 an. issues a speci5ie. error "essage to t%e session +og 5i+e< Note:I5 you use A(ORT in an e6pression 5or an unconnecte. port7 t%e $o@erCenter Integration Ser)ice .oes not run t%e A(ORT 5unction< Returns t%e a#so+ute )a+ue o5 a nu"eric )a+ue< Note: I5 t%e return )a+ue is eci"a+ @it% precision greater t%an ;37 you can ena#+e %ig% precision to ensure .eci"a+ precision up to 0L .igits< A..s a speci5ie. a"ount to one part o5 a .ateti"e )a+ue7 an. returns a .ate in t%e sa"e 5or"at as t%e .ate you pass to t%e 5unction<A *TO* ATE accepts positi)e an. negati)e integer )a+ues ecrypts t%e #inary .ata to string 5or"at<$o@erCenter Integration Ser)ice uses FI$SC appro)e. cryptograp%ic a+gorit%" A A.)ance. Encryption Stan.ar. (AES! a+gorit%" @it% ;0LC#it enco.ing< Encrypts t%e String .ata to #inary 5or"at<$o@erCenter Integration Ser)ice uses FI$SC appro)e. cryptograp%ic a+gorit%" A A.)ance. Encryption Stan.ar. (AES! a+gorit%" @it% ;0LC#it enco.ing< ASCII 5unction returns t%e nu"eric ASCII )a+ue o5 t%e 5irst c%aracter o5 t%e string passe. to t%e 5unction< Returns t%e a)erage o5 a++ )a+ues in a group o5 ro@s< Optiona++y7 you can app+y a 5i+ter to +i"it t%e ro@s you rea. to ca+cu+ate t%e a)erage< Note:,ou can nest on+y one ot%er aggregate 5unction @it%in AVG7 an. t%e neste. 5unction "ust return a Nu"eric .atatype< Returns t%e s"a++est integer greater t%an or eBua+ to t%e nu"eric )a+ue passe. to t%is 5unction Note: ,ou get Integer i5 you pass a nu"eric )a+ue @it% .ec+are. precision #et@een > an. 0L< ou#+e i5 you pass a nu"eric )a+ue @it% .ec+are. precision greater t%an 0L< C%ooses a string 5ro" a +ist o5 strings #ase. on a gi)en position< ,ou speci5y t%e position an. t%e )a+ue< I5 t%e )a+ue "atc%es t%e position7 t%e $o@erCenter Integration Ser)ice returns t%e )a+ue< Note:C&OOSE returns NULL i5 t%e e6pression .oes not contain t%e argu"ent< 5or e6A C&OOSE( 27 G8ni5eG7 G5+as%+ig%tG7 G.i)ing %oo.G ! HNULL C&R returns t%e ASCII c%aracter correspon.ing to t%e nu"eric )a+ue you pass to t%is 5unction<
tion
Co"presses .ata using t%e J+i# ;<0<; co"pression a+gorit%"< Use t%e COM$RESS 5unction #e5ore you sen. +arge a"ounts o5 .ata o)er a @i.e area net@or8< Concatenates t@o strings< CONCAT con)erts a++ .ata to te6t #e5ore concatenating t%e strings< A+ternati)e+y7 use t%e ZZ string operator to concatenate strings< Using t%e ZZ string operator instea. o5 CONCAT i"pro)es $o@erCenter Integration Ser)ice per5or"ance< Note: ,ou can use Any .atatype e6cept (inary
INTERNAL
INTERNAL
Con)erts a nu"#er 5ro" one #ase )a+ue to anot%er #ase )a+ue< Returns t%e cosine o5 a nu"eric )a+ue (e6presse. in ra.ians!< Returns t%e %yper#o+ic cosine o5 a nu"eric )a+ue (e6presse. in ra.ians!< Returns t%e nu"#er o5 ro@s t%at %a)e nonCnu++ )a+ues in a group< Optiona++y7 you can inc+u.e t%e asteris8 (=! argu"ent to count a++ input )a+ues in a trans5or"ation< ,ou can nest on+y one ot%er aggregate 5unction @it%in COUNT< ,ou can app+y a con.ition to 5i+ter ro@s #e5ore counting t%e"< Returns a /0C#it Cyc+ic Re.un.ancy C%ec8 (CRC/0! )a+ue< Use CRC/0 to 5in. .ata trans"ission errors< ,ou can a+so use CRC/0 i5 you @ant to )eri5y t%at .ata store. in a 5i+e %as not #een "o.i5ie.< Returns a running tota+< A running tota+ "eans CUME returns a tota+ eac% ti"e it a..s a )a+ue< ,ou can a.. a con.ition to 5i+ter ro@s out o5 t%e ro@ set #e5ore ca+cu+ating t%e running tota+< Returns an integer in.icating @%ic% o5 t@o .ates is ear+ier< ATE*COM$ARE returns an integer )a+ue rat%er t%an a .ate )a+ue< Note: ReturnsAC; i5 t%e 5irst .ate is ear+ier< > i5 t%e t@o .ates are eBua+< ; i5 t%e secon. .ate is ear+ier< NULL i5 one o5 t%e .ate )a+ues is NULL< Returns t%e +engt% o5 ti"e #et@een t@o .ates< ,ou can reBuest t%e 5or"at to #e years7 "ont%s7 .ays7 %ours7 "inutes7 secon.s7 "i++isecon.s7 "icrosecon.s7 or nanosecon.s< T%e $o@erCenter Integration Ser)ice su#tracts t%e secon. .ate 5ro" t%e 5irst .ate an. returns t%e .i55erence< eco.es a #ase 12 enco.e. )a+ue an. returns a string @it% t%e #inary .ata representation o5 t%e .ata<
Searc%es a port 5or a )a+ue you speci5y< I5 t%e 5unction 5in.s t%e )a+ue7 it returns a resu+t )a+ue7 @%ic% you .e5ine< ,ou can #ui+. an un+i"ite. nu"#er o5 searc%es @it%in a ECO E 5unction< eco"presses .ata using t%e J+i# ;<0<; co"pression a+gorit%"< Use t%e ECOM$RESS 5unction on .ata t%at %as #een co"presse. @it% t%e COM$RESS 5unction or a co"pression too+ t%at uses t%e J+i# ;<0<; a+gorit%" Enco.es .ata #y con)erting #inary .ata to string .ata using Mu+tipurpose Internet Mai+ E6tensions (MIME! enco.ing<
INTERNAL
INTERNAL
Causes t%e $o@erCenter Integration Ser)ice to s8ip a ro@ an. issue an error "essage7 @%ic% you .e5ine< T%e error "essage .isp+ays in t%e session +og< T%e $o@erCenter Integration Ser)ice .oes not @rite t%ese s8ippe. ro@s to t%e session reEect 5i+e< Use ERROR in E6pression trans5or"ations to )a+i.ate .ata< Genera++y7 you use ERROR @it%in an IIF or ECO E 5unction to set ru+es 5or s8ipping ro@s Returns e raise. to t%e speci5ie. po@er (e6ponent!7 @%ere eH0<I;L0L;L/< For e6a"p+e7 EX$(0! returns I</LD>31>DLD/>13
Returns t%e 5irst )a+ue 5oun. @it%in a port or group< Optiona++y7 you can app+y a 5i+ter to +i"it t%e ro@s t%e $o@erCenter Integration Ser)ice rea.s< ,ou can nest on+y one ot%er aggregate 5unction @it%in FIRST< Returns t%e +argest integer +ess t%an or eBua+ to t%e nu"eric )a+ue you pass to t%is 5unction< Note: ,ou get Integer i5 you pass a nu"eric )a+ue @it% .ec+are. precision #et@een > an. 0L< ou#+e i5 you pass a nu"eric )a+ue @it% .ec+are. precision greater t%an 0L< Returns t%e 5uture )a+ue o5 an in)est"ent7 @%ere you "a8e perio.ic7 constant pay"ents an. t%e in)est"ent earns a constant interest rate<
Returns t%e speci5ie. part o5 a .ate as an integer )a+ue< T%ere5ore7 i5 you create an e6pression t%at returns t%e "ont% portion o5 t%e .ate7 an. pass a .ate suc% as Apr ; ;DDI >>A>>A>>7 GET* ATE*$ART returns 2< Note: ;0A>>A>>AM returns > #ecause t%e .e5au+t .ate 5or"at is #ase. on t%e 02 %our inter)a+<
Returns t%e greatest )a+ue 5ro" a +ist o5 input )a+ues< Use t%is 5unction to return t%e greatest string7 .ate7 or nu"#er< (y .e5au+t7 t%e "atc% is case sensiti)e< Returns )a+ue; i5 it is t%e greatest o5 t%e input )a+ues7 )a+ue0 i5 it is t%e greatest o5 t%e input )a+ues7 an. so on< NULL i5 any o5 t%e argu"ents is nu++< Returns one o5 t@o )a+ues you speci5y7 #ase. on t%e resu+ts o5 a con.ition< Note:Un+i8e con.itiona+ 5unctions in so"e syste"s7 t%e FALSE ()a+ue0! con.ition in t%e IIF 5unction is not reBuire.< I5 you o"it )a+ue07 t%e 5unction returns t%e 5o++o@ing @%en t%e con.ition is FALSEA > i5 )a+ue; is a Nu"eric .atatype< E"pty string i5 )a+ue; is a String .atatype< NULL i5 )a+ue; is a ate?Ti"e .atatype
INTERNAL
INTERNAL
Matc%es input .ata to a +ist o5 )a+ues< (y .e5au+t7 t%e "atc% is case sensiti)e< Note: '%en CaseF+ag is a nu"#er ot%er t%an >7 t%e 5unction is case sensiti)e< '%en CaseF+ag is a nu++ )a+ue or >7 t%e 5unction is not case sensiti)e<
Fin.s t%e in.e6 o5 a )a+ue a"ong a +ist o5 )a+ues< (y .e5au+t7 t%e "atc% is case sensiti)e< Note: '%en CaseF+ag is a nu"#er ot%er t%an >7 t%e 5unction is case sensiti)e< '%en CaseF+ag is a nu++ )a+ue or >7 t%e 5unction is not case sensiti)e<
Capita+iJes t%e 5irst +etter in eac% @or. o5 a string an. con)erts a++ ot%er +etters to +o@ercase< 'or.s are .e+i"ite. #y @%ite space (a #+an8 space7 5or"5ee.7 ne@+ine7 carriage return7 ta#7 or )ertica+ ta#! an. c%aracters t%at are not a+p%anu"eric< For e6a"p+e7 i5 you pass t%e string Q[T&OMASR7 t%e 5unction returns T%o"as<
Returns t%e position o5 a c%aracter set in a string7 counting 5ro" +e5t to rig%t<
Returns @%et%er a )a+ue is NULL< ISNULL e)a+uates an e"pty string as FALSE< NoteA To test 5or e"pty strings7 use LENGT&<
Returns @%et%er a string )a+ue is a )a+i. .ate< A )a+i. .ate is any string in t%e .ate portion o5 t%e .ate ti"e 5or"at speci5ie. in t%e session< I5 t%e string you @ant to test is not in t%is .ate 5or"at7 use t%e TO* ATE 5or"at string to speci5y t%e .ate 5or"at< I5 t%e strings passe. to IS* ATE .o not "atc% t%e 5or"at string speci5ie.7 t%e 5unction returns FALSE (>!< I5 t%e strings "atc% t%e 5or"at string7 t%e 5unction returns TRUE (;!< IS* ATE e)a+uates strings an. returns an integer )a+ue< Note: IS* ATE uses t%e sa"e 5or"at strings as TO* ATE<
INTERNAL
INTERNAL
Returns @%et%er a string is a )a+i. nu"#er< A )a+i. nu"#er consists o5 t%e 5o++o@ing partsA Optiona+ space #e5ore t%e nu"#er Optiona+ sign (Y?C! One or "ore .igits @it% an optiona+ .eci"a+ point Optiona+ scienti5ic notation7 suc% as t%e +etter QeR or QER (an. t%e +etter Q.R or Q R on 'in.o@s! 5o++o@e. #y an optiona+ sign (Y?C!7 5o++o@e. #y one or "ore .igits Optiona+ @%ite space 5o++o@ing t%e nu"#er Returns @%et%er a string )a+ue consists entire+y o5 spaces< A space is a #+an8 space7 a 5or"5ee.7 a ne@+ine7 a carriage return7 a ta#7 or a )ertica+ ta#< IS*S$ACES e)a+uates an e"pty string as FALSE #ecause t%ere are no spaces< To test 5or an e"pty string7 use LENGT&< NoteA Return ATRUE (;! i5 t%e ro@ consists entire+y o5 spaces< FALSE (>! i5 t%e ro@ contains .ata< NULL i5 a )a+ue in t%e e6pression is NULL<
Returns t%e +ast ro@ in t%e se+ecte. port< Optiona++y7 you can app+y a 5i+ter to +i"it t%e ro@s t%e $o@erCenter Integration Ser)ice rea.s< ,ou can nest on+y one ot%er aggregate 5unction @it%in LAST<
Returns t%e .ate o5 t%e +ast .ay o5 t%e "ont% 5or eac% .ate in a port< Returns t%e s"a++est )a+ue 5ro" a +ist o5 input )a+ues< (y .e5au+t7 t%e "atc% is case sensiti)e< Returns )a+ue; i5 it is t%e +east o5 t%e input )a+ues7 )a+ue0 i5 it is t%e +east o5 t%e input )a+ues7 an. so on< NULL i5 any o5 t%e argu"ents is nu++< Returns t%e nu"#er o5 c%aracters in a string7 inc+u.ing trai+ing #+an8s<
Returns t%e natura+ +ogarit%" o5 a nu"eric )a+ue< For e6a"p+e7 LN(/! returns ;<>DL1;0< ,ou usua++y use t%is 5unction to ana+yJe scienti5ic .ata rat%er t%an #usiness .ata< T%is 5unction is t%e reciproca+ o5 t%e 5unction EX$<
INTERNAL
INTERNAL
Returns t%e +ogarit%" o5 a nu"eric )a+ue< Most o5ten7 you use t%is 5unction to ana+yJe scienti5ic .ata rat%er t%an #usiness .ata<
ou use t%e LOO-U$ 5unction in a "apping7 you nee. to ena#+e t%e +oo8up cac%ing option 5or /<3 o continue using t%e LOO-U$ 5unction7 rat%er t%an creating Loo8up trans5or"ations<
Con)erts a string to a speci5ie. +engt% #y a..ing #+an8s or c%aracters to t%e #eginning o5 t%e string< I5 you o"it t%e secon. string7 t%e 5unction pa.s t%e start o5 t%e 5irst string @it% #+an8s<
Re"o)es #+an8s or c%aracters 5ro" t%e Start o5 a string< I5 you .o not speci5y a tri"*set para"eter in t%e e6pressionA In UNICO E "o.e7 LTRIM re"o)es #ot% sing+eC an. .ou#+eC#yte spaces 5ro" t%e en. o5 a string< In ASCII "o.e7 LTRIM re"o)es on+y sing+eC#yte spaces< Returns t%e .ate an. ti"e #ase. on t%e input )a+ues< First / argu"ants year7Mont%7 ay are necessary an. rest are optiona+< Returns t%e +atest .ate 5oun. @it%in a port or group< ,ou can app+y a 5i+ter to +i"it t%e ro@s in t%e searc%< ,ou can nest on+y one ot%er aggregate 5unction @it%in MAX< Returns t%e "a6i"u" nu"eric )a+ue 5oun. @it%in a port or group< ,ou can app+y a 5i+ter to +i"it t%e ro@s in t%e searc%< ,ou can nest on+y one ot%er aggregate 5unction @it%in MAX<
Returns t%e %ig%est string )a+ue 5oun. @it%in a port or group< ,ou can app+y a 5i+ter to +i"it t%e ro@s in t%e searc%< ,ou can nest on+y one ot%er aggregate 5unction @it%in MAX< Note: T%e MAX 5unction uses t%e sa"e sort or.er t%at t%e Sorter trans5or"ation uses< &o@e)er7 t%e MAX 5unction is case sensiti)e7 an. t%e Sorter trans5or"ation "ay not #e case sensiti)e<
INTERNAL
INTERNAL
Ca+cu+ates t%e c%ec8su" o5 t%e input )a+ue< T%e 5unction uses MessageC igest a+gorit%" 3 (M 3!< M 3 is a oneC@ay cryptograp%ic %as% 5unction @it% a ;0LC#it %as% )a+ue< ,ou can conc+u.e t%at input )a+ues are .i55erent @%en t%e c%ec8su"s o5 t%e input )a+ues are .i55erent< Use M 3 to )eri5y .ata integrity< Note:,ou can use t%e return )a+ue as a %as% 8ey<
Returns t%e "e.ian o5 a++ )a+ues in a se+ecte. port< I5 t%ere is an e)en nu"#er o5 )a+ues in t%e port7 t%e "e.ian is t%e a)erage o5 t%e "i..+e t@o )a+ues @%en a++ )a+ues are p+ace. or.ina++y on a nu"#er +ine< I5 t%ere is an o.. nu"#er o5 )a+ues in t%e port7 t%e "e.ian is t%e "i..+e nu"#er< ,ou can nest on+y one ot%er aggregate 5unction @it%in ME IAN7 an. t%e neste. 5unction "ust return a Nu"eric .atatype< T%e $o@erCenter Integration Ser)ice rea.s a++ ro@s o5 .ata to per5or" t%e "e.ian ca+cu+ation< T%e process o5 rea.ing ro@s o5 .ata to per5or" t%e ca+cu+ation "ay a55ect per5or"ance< Optiona++y7 you can app+y a 5i+ter to +i"it t%e ro@s you rea. to ca+cu+ate t%e "e.ian<
Enco.es string )a+ues< ,ou can speci5y t%e +engt% o5 t%e string t%at you @ant to enco.e< META$&ONE enco.es c%aracters o5 t%e Eng+is% +anguage a+p%a#et (AC\!< It enco.es #ot% uppercase an. +o@ercase +etters in uppercase< META$&ONE enco.es c%aracters accor.ing to t%e 5o++o@ing +ist o5 ru+esA S8ips )o@e+s (A7 E7 I7 O7 an. U! un+ess one o5 t%e" is t%e 5irst c%aracter o5 t%e input string< META$&ONE(QCARR! returns Q-RR an. META$&ONE(QAARR! returns QARR< Returns t%e ear+iest .ate 5oun. in a port or group< ,ou can app+y a 5i+ter to +i"it t%e ro@s in t%e searc%< ,ou can nest on+y one ot%er aggregate 5unction @it%in MIN7 an. t%e neste. 5unction "ust return a .ate .atatype< Returns t%e s"a++est nu"eric )a+ue 5oun. in a port or group< ,ou can app+y a 5i+ter to +i"it t%e ro@s in t%e searc%< ,ou can nest on+y one ot%er aggregate 5unction @it%in MIN7 an. t%e neste. 5unction "ust return a nu"eric .atatype< Returns t%e +o@est string )a+ue 5oun. in a port or group< ,ou can app+y a 5i+ter to +i"it t%e ro@s in t%e searc%< ,ou can nest on+y one ot%er aggregate 5unction @it%in MIN7 an. t%e neste. 5unction "ust return a string .atatype< Note: T%e MIN 5unction uses t%e sa"e sort or.er t%at t%e Sorter trans5or"ation uses< &o@e)er7 t%e MIN 5unction is case sensiti)e7 #ut t%e Sorter trans5or"ation "ay not #e case sensiti)e<
INTERNAL
INTERNAL
Returns t%e re"ain.er o5 a .i)ision ca+cu+ation< T%e ro@ (037 >! pro.uce. an error #ecause you cannot .i)i.e #y >< To a)oi. .i)i.ing #y >7 you can create an e6pression si"i+ar to t%e 5o++o@ing7 @%ic% returns t%e "o.u+us o5 $rice .i)i.e. #y 4uantity on+y i5 t%e Buantity is not >< I5 t%e Buantity is >7 t%e 5unction returns NULLA MO ( $RICE7 IIF( 4T, H >7 NULL7 4T, !!
Returns t%e a)erage (ro@C#yCro@! o5 a speci5ie. set o5 ro@s< Optiona++y7 you can app+y a con.ition to 5i+ter ro@s #e5ore ca+cu+ating t%e "o)ing a)erage< NoteA I5 you "ention 5i+ter con.ition as 3 you see 5irst 2 )a+ues as NULL since MOVINGAVG 5unction returns a )a+ue a5ter it rea.s 3 ro@s< 1 t% ro@ you @i++ get t%e a)erage o5 0n. ro@ to 1t% ro@ an. 5or I t%e ro@ a)g o5 /r. to It% ro@ an. so on<
Returns t%e su" (ro@C#yCro@! o5 a speci5ie. set o5 ro@s< Optiona++y7 you can app+y a con.ition to 5i+ter ro@s #e5ore ca+cu+ating t%e "o)ing su"< Note: I5 you "ention 5i+ter con.ition as 3 you see 5irst 2 )a+ues as NULL since MOVINGSUM 5unction returns a )a+ue a5ter it rea.s 3 ro@s< 1 t% ro@ you @i++ get t%e su" o5 0n. ro@ to 1t% ro@ an. 5or I t%e ro@ su" o5 /r. to It% ro@ an. so on<
Returns t%e nu"#er o5 perio.s 5or an in)est"ent #ase. on a constant interest rate an. perio.ic7 constant pay"ents< Note:To ca+cu+ate interest rate earne. in eac% perio.7 .i)i.e t%e annua+ rate #y t%e nu"#er o5 pay"ents "a.e in an year< For e6a"p+e7 i5 you "a8e "ont%+y pay"ents at an annua+ interest rate o5 ;3 percent7 t%e )a+ue o5 t%e Rate argu"ent is ;3V .i)i.e. #y ;0< I5 you "a8e annua+ pay"ents7 t%e )a+ue o5 t%e Rate argu"ent is ;3V< T%e pay"ent )a+ue an. present )a+ue are negati)e #ecause t%ese are a"ounts t%at you pay< Ca+cu+ates t%e )a+ue t%at 5a++s at a gi)en percenti+e in a group o5 nu"#ers< ,ou can nest on+y one ot%er aggregate 5unction @it%in $ERCENTILE7 an. t%e neste. 5unction "ust return a Nu"eric .atatype< T%e $o@erCenter Integration Ser)ice rea.s a++ ro@s o5 .ata to per5or" t%e percenti+e ca+cu+ation< T%e process o5 rea.ing ro@s to per5or" t%e ca+cu+ation "ay a55ect per5or"ance< Optiona++y7 you can app+y a 5i+ter to +i"it t%e ro@s you rea. to ca+cu+ate t%e percenti+e<
Returns t%e pay"ent 5or a +oan #ase. on constant pay"ents an. a constant interest rate< Notes To ca+cu+ate interest rate earne. in eac% perio.7 .i)i.e t%e annua+ rate #y t%e nu"#er o5 pay"ents "a.e in a year< For e6a"p+e7 i5 you "a8e "ont%+y pay"ents at an annua+ interest rate o5 ;3V7 t%e rate is ;3V?;0< I5 you "a8e annua+ pay"ents7 t%e rate is ;3V< T%e pay"ent )a+ue is negati)e #ecause t%ese are a"ounts t%at you pay<
INTERNAL
INTERNAL
Returns a )a+ue raise. to t%e e6ponent you pass to t%e 5unction< Note:T%e )a+ue C/<> raise. to 1 returns t%e sa"e resu+ts as C/<> raise. to 3<3< I5 t%e #ase is negati)e7 t%e e6ponent "ust #e an integer< Ot%er@ise7 t%e $o@erCenter Integration Ser)ice roun.s t%e e6ponent to t%e nearest integer )a+ue< Returns t%e present )a+ue o5 an in)est"ent< Returns a ran.o" nu"#er #et@een > an. ;< T%is is use5u+ 5or pro#a#i+ity scenarios< Note: See. Va+ue "ust #e a constant< I5 you .o not enter a see.7 t%e $o@erCenter Integration Ser)ice uses t%e current syste" ti"e to .eri)e t%e nu"#ers o5 secon.s since Kanuary ;7 ;DI;< It uses t%is )a+ue as t%e see.< Returns t%e interest rate earne. per perio. #y a security<
E6tracts su#patterns o5 a regu+ar e6pression @it%in an input )a+ue< For e6a"p+e7 5ro" a regu+ar e6pression pattern 5or a 5u++ na"e7 you can e6tract t%e 5irst na"e or +ast na"e< NoteA Use t%e REG*RE$LACE 5unction to rep+ace a c%aracter pattern in a string @it% anot%er c%aracter pattern<
Returns @%et%er a )a+ue "atc%es a regu+ar e6pression pattern< T%is +ets you )a+i.ate .ata patterns7 suc% as I s7 te+ep%one nu"#ers7 posta+ co.es7 an. state na"es< Note: Use t%e REG*RE$LACE 5unction to rep+ace a c%aracter pattern in a string @it% a ne@ c%aracter pattern< ,ou can a+so use REG*MATC& 5or t%e 5o++o@ing tas8sA To )eri5y t%at a )a+ue "atc%es a pattern< T%is use is si"i+ar to t%e S4L LI-E 5unction< To )eri5y t%at )a+ues are c%aracters< T%is use is si"i+ar to t%e S4L IS*C&AR 5unction<
Rep+aces c%aracters in a string @it% anot%er c%aracter pattern< (y .e5au+t7 REG*RE$LACE searc%es t%e input string 5or t%e c%aracter pattern you speci5y an. rep+aces a++ occurrences @it% t%e rep+ace"ent pattern< ,ou can a+so in.icate t%e nu"#er o5 occurrences o5 t%e pattern you @ant to rep+ace in t%e string<
INTERNAL
INTERNAL
Rep+aces c%aracters in a string @it% a sing+e c%aracter or no c%aracter< RE$LACEC&R searc%es t%e input string 5or t%e c%aracters you speci5y an. rep+aces a++ occurrences o5 a++ c%aracters @it% t%e ne@ c%aracter you speci5y<
Rep+aces c%aracters in a string @it% a sing+e c%aracter7 "u+tip+e c%aracters7 or no c%aracter< RE$LACESTR searc%es t%e input string 5or a++ strings you speci5y an. rep+aces t%e" @it% t%e ne@ string you speci5y<
Roun.s one part o5 a .ate< ,ear< Roun.s t%e year portion o5 a .ate #ase. on t%e "ont%< Mont%< Roun.s t%e "ont% portion o5 a .ate #ase. on t%e .ay o5 t%e "ont%< ay< Roun.s t%e .ay portion o5 t%e .ate #ase. on t%e ti"e< &our< Roun.s t%e %our portion o5 t%e .ate #ase. on t%e "inutes in t%e %our< Minute< Roun.s t%e "inute portion o5 t%e .ate #ase. on t%e secon.s< Secon.< Roun.s t%e secon. portion o5 t%e .ate #ase. on t%e "i++isecon.s< Mi++isecon.< Roun.s t%e "i++isecon. portion o5 t%e .ate #ase. on t%e "icrosecon.s< Microsecon.< Roun.s t%e "icrosecon. portion o5 t%e .ate #ase. on t%e nanosecon.s<
Con)erts a string to a speci5ie. +engt% #y a..ing #+an8s or c%aracters to t%e en. o5 t%e string< I5 you o"it t%e secon. string7 t%e 5unction pa.s t%e en. o5 t%e 5irst string @it% #+an8s<
INTERNAL
INTERNAL
Re"o)es #+an8s or c%aracters 5ro" t%e en. o5 a string< I5 you .o not speci5y a tri"*set para"eter in t%e e6pressionA In UNICO E "o.e7 RTRIM re"o)es #ot% sing+eC an. .ou#+eC#yte spaces 5ro" t%e en. o5 a string< In ASCII "o.e7 RTRIM re"o)es on+y sing+eC#yte spaces< Counts t%e ro@s e)a+uate. #y t%e 5unction an. incre"ents t%e current )a+ue o5 a "apping )aria#+e #ase. on t%e count< Increases t%e current )a+ue #y one 5or eac% ro@ "ar8e. 5or insertion< ecreases t%e current )a+ue #y one 5or eac% ro@ "ar8e. 5or .e+etion< -eeps t%e current )a+ue t%e sa"e 5or eac% ro@ "ar8e. 5or up.ate or reEect< Returns t%e ne@ current )a+ue< Note:Use t%e SETCOUNTVARIA(LE 5unction on+y once 5or eac% "apping )aria#+e in a pipe+ine<Use "apping )aria#+es @it% a count aggregation type<
Sets one part o5 a ate?Ti"e )a+ue to a )a+ue you speci5y< 'it% SET* ATE*$ART7 you can c%ange t%e 5o++o@ing parts o5 a .ate< ,ear7Mont%7 ay7&our7Minute7Secon.s7Mi++i 7Micro7Nano Secon.s< Note:I5 you @ant to c%ange "u+tip+e parts o5 a .ate at one ti"e7 you can nest "u+tip+e SET* ATE*$ART 5unctions @it%in t%e .ate argu"ent< For e6a"p+e7 you "ig%t @rite t%e 5o++o@ing e6pression to c%ange a++ o5 t%e .ates in t%e ATE*ENTERE port to Ku+y ; ;DDLA SET* ATE*$ART( SET* ATE*$ART( SET* ATE*$ART( ATE*ENTERE 7 G,,,,G7 ;DDL!7MMG7 I!7 G G7 ;!
Sets t%e current )a+ue o5 a "apping )aria#+e to t%e +o@er o5 t@o )a+uesA t%e current )a+ue o5 t%e )aria#+e or t%e )a+ue you speci5y< Returns t%e ne@ current )a+ue< T%e SETMAXVARIA(LE 5unction e6ecutes on+y i5 a ro@ is "ar8e. as insert< SETMAXVARIA(LE ignores a++ ot%er ro@ types an. t%e current )a+ue re"ains unc%ange.< Note: Use t%e SETMAXVARIA(LE 5unction on+y once 5or eac% "apping )aria#+e in a pipe+ine<Use "apping )aria#+es @it% Ma6 aggregation type<
Sets t%e current )a+ue o5 a "apping )aria#+e to t%e +o@er o5 t@o )a+uesA t%e current )a+ue o5 t%e )aria#+e or t%e )a+ue you speci5y< Returns t%e ne@ current )a+ue< T%e SETMINVARIA(LE 5unction e6ecutes on+y i5 a ro@ is "ar8e. as insert< SETMINVARIA(LE ignores a++ ot%er ro@ types an. t%e current )a+ue re"ains unc%ange.< NoteA Use t%e SETMINVARIA(LE 5unction on+y once 5or eac% "apping )aria#+e in a pipe+ine<Use "apping )aria#+es @it% Min aggregation type
Sets t%e current )a+ue o5 a "apping )aria#+e to a )a+ue you speci5y< Returns t%e speci5ie. )a+ue< T%e SETVARIA(LE 5unction e6ecutes on+y i5 a ro@ is "ar8e. as insert or up.ate< SETVARIA(LE ignores a++ ot%er ro@ types an. t%e current )a+ue re"ains unc%ange.< NoteA Use t%e SETVARIA(LE 5unction on+y once 5or eac% "apping )aria#+e in a pipe+ine< SETVARIA(LE(FFtest7NULL! @i++ assign t%e +atest )a+ue to FFtest
INTERNAL
INTERNAL
Returns @%et%er a nu"eric )a+ue is positi)e7 negati)e7 or >< Note: C; 5or negati)e )a+ues< > 5or >< ; 5or positi)e )a+ues< NULL i5 NULL
Returns t%e %yper#o+ic SIN o5 t%e nu"eric )a+ue passe. to t%is 5unction<
Enco.es a string )a+ue into a 5ourCc%aracter string< SOUN EX @or8s 5or c%aracters in t%e Eng+is% a+p%a#et (AC\!< It uses t%e 5irst c%aracter o5 t%e input string as t%e 5irst c%aracter in t%e return )a+ue an. enco.es t%e re"aining t%ree uniBue consonants as nu"#ers< SOUN EX enco.es c%aracters accor.ing to t%e 5o++o@ing +ist o5 ru+esA ;< Uses t%e 5irst c%aracter in string as t%e 5irst c%aracter in t%e return )a+ue an. enco.es it in uppercase< For e6a"p+e7 #ot% SOUN EX(QKo%nR! an. SOUN EX(QEo%nR! return QK3>>R< 0< Enco.es t%e 5irst t%ree uniBue consonants 5o++o@ing t%e 5irst c%aracter in string an. ignores t%e rest< For e6a"p+e7 #ot% SOUN EX(QKo%nR(R! an. SOUN EX(QKo%nR(C R! return QK31;R< /<Assigns a sing+e co.e to consonants t%at soun. a+i8e<
Returns t%e sBuare root o5 a nonCnegati)e nu"eric )a+ue< Returns t%e stan.ar. .e)iation o5 t%e nu"eric )a+ues you pass to t%is 5unction< ST EV is use. to ana+yJe statistica+ .ata< ,ou can nest on+y one ot%er aggregate 5unction @it%in ST EV7 an. t%e neste. 5unction "ust return a Nu"eric .atatype<
Returns a portion o5 a string< SU(STR counts a++ c%aracters7 inc+u.ing #+an8s7 starting at t%e #eginning o5 t%e string<
Returns t%e su" o5 a++ )a+ues in t%e se+ecte. port< Optiona++y7 you can app+y a 5i+ter to +i"it t%e ro@s you rea. to ca+cu+ate t%e tota+< ,ou can nest on+y one ot%er aggregate 5unction @it%in SUM7 an. t%e neste. 5unction "ust return a Nu"eric .atatype<
INTERNAL
INTERNAL
Returns t%e current .ate an. ti"e o5 t%e no.e %osting t%e $o@erCenter Integration Ser)ice @it% precision to t%e nanosecon.< T%e precision to @%ic% you .isp+ay t%e .ate an. ti"e .epen.s on t%e p+at5or"< T%e return )a+ue o5 t%e 5unction )aries .epen.ing on %o@ you con5igure t%e argu"entA '%en you con5igure t%e argu"ent o5 S,STIMESTAM$ as a )aria#+e7 t%e $o@erCenter Integration Ser)ice e)a+uates t%e 5unction 5or eac% ro@ in t%e trans5or"ation< '%en you con5igure t%e argu"ent o5 S,STIMESTAM$ as a constant7 t%e $o@erCenter Integration Ser)ice e)a+uates t%e 5unction once an. retains t%e )a+ue 5or eac% ro@ in t%e trans5or"ation<
Returns t%e %yper#o+ic tangent o5 t%e nu"eric )a+ue passe. to t%is 5unction<
Con)erts a string or nu"eric )a+ue to a #igint )a+ue< TO*(IGINT synta6 contains an optiona+ argu"ent t%at you can c%oose to roun. t%e nu"#er to t%e nearest integer or truncate t%e .eci"a+ portion< TO*(IGINT ignores +ea.ing #+an8s< Note:TO*(IGINT truncates t%e .eci"a+ portion @%en t%e 5+ag is TRUE or a nu"#er ot%er t%an >< TO*(IGINT roun.s t%e )a+ue to t%e nearest integer i5 t%e 5+ag is FALSE or > or i5 you o"it t%is argu"ent< T%e 5+ag is not set #y .e5au+t< Con)erts .ates to c%aracter strings< ,ou can con)ert t%e .ate into any 5or"at using t%e TO*C&AR 5or"at strings< Note: I5 you o"it t%e 5or"at argu"ent7 TO*C&AR returns a string in t%e .ate 5or"at speci5ie. in t%e session7 #y .e5au+t7 MM? ?,,,, &&02AMIASS<USA In TO*C&AR7 5or"at returns .ay o5 t%e @ee87 A, PP na"e o5 t%e .ay PP ay o5 t%e Mont% an. PP ay o5 t%e year<Si"i+ar+y 'PP'ee8 o5 t%e "ont% an. ''PP'ee8 o5 t%e year respecti)e+y< Con)erts nu"eric )a+ues to te6t strings< Con)erts .ou#+e )a+ues to strings o5 up to ;1 .igits an. pro)i.es accuracy up to ;3 .igits< I5 you pass a nu"#er @it% "ore t%an ;3 .igits7 TO*C&AR roun.s t%e nu"#er to t%e si6teent% .igit< Con)erts a c%aracter string to a ate?Ti"e .atatype< ,ou use t%e TO* ATE 5or"at strings to speci5y t%e 5or"at o5 t%e source strings< T%e output port "ust #e ate?Ti"e 5or TO* ATE e6pressions< I5 you are con)erting t@oC.igit years @it% TO* ATE7 use eit%er t%e RR or ,, 5or"at string< o not use t%e ,,,, 5or"at string
INTERNAL
INTERNAL
Con)erts a string or nu"eric )a+ue to a .eci"a+ )a+ue< TO* ECIMAL ignores +ea.ing #+an8s< Note: I5 t%e string contains a nonCnu"eric c%aracter7 con)erts t%e nu"eric portion o5 t%e string up to t%e 5irst nonCnu"eric c%aracter< I5 t%e 5irst c%aracter is nonCnu"eric7 returns ><
Con)erts a string or nu"eric )a+ue to a .ou#+eCprecision 5+oating point nu"#er (t%e ou#+e .atatype!< TO*FLOAT ignores +ea.ing #+an8s< Con)erts a string or nu"eric )a+ue to an integer< TO*INTEGER synta6 contains an optiona+ argu"ent t%at you can c%oose to roun. t%e nu"#er to t%e nearest integer or truncate t%e .eci"a+ portion< TO*INTEGER ignores +ea.ing #+an8s NoteATO*INTEGER truncates t%e .eci"a+ portion @%en t%e 5+ag is TRUE or a nu"#er ot%er t%an >< TO*INTEGER roun.s t%e )a+ue to t%e nearest integer i5 t%e 5+ag is FALSE or > or i5 you o"it t%is argu"ent<
Truncates .ates to a speci5ic year7 "ont%7 .ay7 %our7 "inute7 secon.7 "i++isecon.7 or "icrosecon.<
Truncates nu"#ers to a speci5ic .igit< Note: I5 precision is a positi)e integer7 TRUNC returns nu"eric*)a+ue @it% t%e nu"#er o5 .eci"a+ p+aces speci5ie. #y precision< I5 precision is a negati)e integer7 TRUNC c%anges t%e speci5ie. .igits to t%e +e5t o5 t%e .eci"a+ point to Jeros< I5 you o"it t%e precision argu"ent7 TRUNC truncates t%e .eci"a+ portion o5 nu"eric*)a+ue an. returns an integer<
Con)erts +o@ercase string c%aracters to uppercase< Returns t%e )ariance o5 a )a+ue you pass to it< VARIANCE is use. to ana+yJe statistica+ .ata< ,ou can nest on+y one ot%er aggregate 5unction @it%in VARIANCE7 an. t%e neste. 5unction "ust return a Nu"eric .atatype<
INTERNAL