INCLUDE( ) function

Returns a string with the specified included characters, and with all other characters removed.


INCLUDE(string, characters_to_include)



Character. The value to restrict to included characters.


Character. A quoted string containing a list of the characters to include.




This function compares each character in string with the character listed in the characters_to_include parameter, and if a match occurs the character is included in the output string. If there are no matches between string and characters_to_exclude the output of the function is blank. If you are specifying double quotes in characters_to_exclude, you must enclose them in single quotes (i.e., ‘”’).

The INCLUDE( ) function is case-sensitive. If you specify “ID” in characters_to_include these characters will not be included in “id94022”. If there is a chance the case may be mixed, first use the UPPER( ) function to convert all characters to uppercase.

The INCLUDE( ) function is the opposite of the EXCLUDE( ) function. If you want to include letters and special characters in the output, the list of values in the characters_to_include parameter will be quite long. You should use the EXCLUDE( ) function instead.


Example Return value

INCLUDE("123 Main St.", "0123456789")


INCLUDE(“123-23-1234”, “1243”)




Related reference
EXCLUDE( ) function

(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback