10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System-defined FunctionsNameleft(c1,len)ResultTypedata typeanycharacterdata typeDescriptiontwo arguments. If the result is a c or charstring, it is padded with blanks to achievethe proper length. To determine the datatype results of concatenating strings, seeString Concatenation Results (seepage 57).Returns the leftmost len characters of c1.If the result is a fixed-length c or charstring, it is the same length as c1,padded with blanks. The result format isthe same as c1.length(c1) smallint If c1 is a fixed-length c or char string,returns the length of c1 without trailingblanks. If c1 is a variable-length string,returns the number of characters actuallyin c1.locate(c1,c2) smallint Returns the location of the firstoccurrence of c2 within c1, includingtrailing blanks from c2. The location is inthe range 1 to size(c1). If c2 is notfound, the function returns size(c1) + 1.(The function size() is described in thistable.)If c1 and c2 are different string datatypes, c2 is coerced into c1's data type.lowercase(c1)pad(c1)right(c1,len)anycharacterdata typetext orvarcharanycharacterdata typeConverts all uppercase characters in c1to lowercase.Returns c1 with trailing blanks appendedto c1. For example, if c1 is a varcharstring that could hold 50 characters butonly has two characters, then pad(c1)appends 48 trailing blanks to c1 to formthe result.Returns the rightmost len characters ofc1. Trailing blanks are not removed first.If c1 is a fixed-length character string,the result is padded to the same lengthas c1. If c1 is a variable-length characterstring, no padding occurs. The resultformat is the same as c1.Language Elements 55

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!