Database Management Reference Manual

Expressions : Text Expressions : Text Functions
Return the substring of text1 which is after the leftmost occurrence of text2 in text1.
If text2 does not occur in text1, the null string is returned.
Return the substring of text1 which is before the leftmost occurrence of text2 in text1. If text2 does not occur in text1, text1 is returned.
For the one-argument form, if the current distance units are FINCH, text is the conversion of the decimal inches value number1 into the format ’aa’bb.cc/dd’. Otherwise, text is the STRING conversion of number1.
distance is the numeric distance in inches that is to be formatted.
feet is a logical flag set to true if output is to be in feet and inches and to false if output is to be in inches.
usformat is a logical set to true if US format is to be used or false if AVEVA E3D™ format is to be used.
fraction is a logical set to true if the fractional component is to be output as a fraction or false if to be output as a decimal denom_or_dp is a number representing the largest denominator if fraction is TRUE or representing the number of decimal places if it is FALSE.
zeros is a logical set to true if zeros are to be shown when that component of the output has no value..
If distance is negative, the first symbol is a minus sign.
If feet is true and the distance is at least a foot, then the number of feet is output next, followed by a single quote (’). Only if zeros is true will the number of feet be output as 0 for distances less than a foot. Otherwise the feet will be omitted.
If inches have been output and fraction is true, these will be followed by a decimal point (.).
If fraction is TRUE and the number has a fractional component, then the numerator and the denominator are shown separated by a slash (/). This is then blank padded up to the width that the largest numerator and denominator would take.
If fraction is FALSE and the number of decimal places is greater than zero, then the decimal point (.) is displayed followed by the remainder up to the appropriate number of decimal places. If the number of decimal places is 0 then the decimal point is not shown either.
With two arguments, returns the number1 component of text1 assuming that text1 is split on any whitespace characters. If number1 is negative, counting of components starts from the right.
With three arguments, as above, but use text2 as the separator on which splitting takes place.
Replace search string text2 in input string text1 with replacement string text3.
If int1 is given this specifies the first occurrence of text2 at which to start replacement.
If int2 is given this specifies the number of replacements to make. int1 and/or int2 may be negative to indicate that the direction is backwards.
If the replacement string text3 is a null string the required number of occurrences of the search string text2 are removed. For example:
If the input string text1 is a null string or an unset text attribute, the input string text1 is returned unchanged. For example:
If the search string text2 is longer than the input string text1, the input string text1 is returned unchanged. For example:
If no occurrence of the search string text2 is found, the input string text1 is returned unchanged. For example:
If required occurrence int1 is not found the input string text1 is returned unchanged. For example:
If the number of replacements required int2 is greater than the actual number of occurrence from the specified start occurrence, replacements are made up to the end of the string ( or beginning in backwards mode). For example:
With two arguments the data type may be either numeric (scalar) or position or direction. With two arguments, convert a number or position into a text string using the format described by text1, which may take any of the values between ’D0’ and ’D6’ (or ’d0’ and ’d6’), where the number indicates the number of decimal places.
With two arguments, return the substring of text1 beginning at the position number1 to the end of text1.
With three arguments, return the substring of text1 beginning at the position number1 and of length number2. If number1 is negative, then counting of characters starts from the RHS of the input string. If number2 is negative, then characters up to and including the start position are returned.
When two arguments are supplied, text2 specifies where the spaces should be removed from: either ’L’ or ’l’ for left, ’R’ or ’r’ for right, and ’M’ or ’m’ for multiple (where multiple occurrences of blanks are squeezed to a single spaces) or any combination of the three key letters. So the default is ’LR’ when this field is omitted.
When the third argument text3 is also supplied, this should only be a single character which overrides the space character as the character being trimmed.

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo