Centrallix - It's Different than what you Think
Home   |   Technology   |   Screen Shots   |   Download   |   Documentation   |   History   |   For Developers

Search...


Search For:

Index...


Centrallix Documentation
1. Getting Started
2. Applications Overview
3. Application Components
4. Reports Overview
5. Report Components
6. SQL Language
7. Process Modeling
8. Application Modeling
9. Role-Based Security
10. Business Logic Modeling
11. Other Objects
12. External API's
13. Internal API's

6.8.1 String Functions


String Functions

These are string-specific functions; many other function types, including aggregates, encoding, etc., can also operate on strings.

FunctionDescriptionStandard
ascii(s)Returns the ASCII or unicode value of the first character of string sSybase/MSSQL
charindex(sn,sh)Locates the position of the first occurrence of needle string sn inside haystack string sh. The position is a 1-based integer (1 refers to the first position in sh). Returns 0 if sn does not occur anywhere in sh.Sybase/MSSQL. MySQL uses locate().
char_length(s)Returns the number of characters in the string s, or NULL if s is NULL.Sybase/MSSQL/MySQL
cos_compare(s1,s2)Returns the statistical degree of match between two strings as a cosine value between 0.0 (not a match) and 1.0 (perfect match).Centrallix
escape(s,e,b)Escapes characters in the string s. Any characters occurring in s that are listed in e will be prefixed by a backslash (\). Always escapes the backslash, whether or not it is in the string e. If any characters in b (the blacklist) occur in s, an error will result.Centrallix.
lev_compare(s1,s2,n)Returns the degree of match between two strings as an edit distance value between 0.0 (not a match) and 1.0 (perfect match). If the third parameter n is supplied, it bases the comparison on a theoretical maximum string length of n.Centrallix
levenshtein(s1,s2)Returns the Levenshtein edit distance between two strings as an integer (0 = perfect match).Centrallix
lower(s)Converts the string s to all lowercase.ANSI
ltrim(s)Removes spaces from the left hand side (beginning) of the string s.Sybase/MSSQL.
lztrim(s)Removes leading zeros from a numeric value when that number is represented in the string s.Centrallix.
quote(s)Encloses the string s in double quote marks, and escapes (with a backslash) any double quote marks or backslashes that occur inside of s.Centrallix
ralign(s,n)Pads the string s on the left hand side with spaces until it reaches the size n; thus, the string s is aligned on the right.Centrallix. MySQL uses lpad()/rpad().
replace(s,f,r)Takes string s, and replaces all occurrences of string f with string r. Returns NULL if either s or f is NULL. If r is NULL, occurrences of string f are replaced with the empty string.MySQL and MSSQL. Sybase uses str_replace().
replicate(s,n)Returns n copies of s concatenated back to back. n can be at most 255.Sybase/MSSQL
reverse(s)Takes the string s and reverses the order of its characters. Often used in combination with charindex() to find the last occurrence of a substring.Sybase/MSSQL and MySQL
right(s,n)Returns the rightmost n characters in s.Sybase/MSSQL
rtrim(s)Removes spaces from the right hand side of s. Note that rtrim() is done automatically for certain types of data when it comes from a database. For example, fixed-length char() values are automatically trimmed.Sybase/MSSQL and MySQL
substitute(f,m)Substitutes placeholders / fields in the format string f, using the object name map (string m) to correlate object names in the current scope to object names in the format string. See Substitute Function for more information.Centrallix
substring(s,p,n)Returns the part of string s which starts at position p (1 is the first position) and continues for n characters. n is optional - if omitted, substring() returns the entire string beginning at position p.Sybase/MSSQL and MySQL
upper(s)Uppercases the string s.ANSI



Comments...


(none yet)

Add a Comment...


Your Name:
Comment:


(c) 2001-2020 LightSys Technology Services, Inc. All trademarks are property of their respective owners.

Project Hosting Provided By:
Hosted by Sourceforge