Returns true if the first string evaluates to be less than or equal to the second string, based on a set of common collation rules.

Source values can be string literals, column references, or expressions that evaluate to strings.

String literal reference example:

stringlessthanequal('a','a')

Output: Returns true since both values are the same.

String literal reference example:

stringlessthanequal('a','b')

Output: Returns true since a evaluates to be less than b.

String literal reference example:

stringlessthanequal('abc','x')

Output: Returns true since the first letter of the first string is less than the first letter of the second string.

Column reference example:

stringlessthanequal(string1,string2)

Output: Returns the evaluation of string1 column values being greater than string2 column values.

 

stringlessthanequal(string_ref1,string_ref2)


ArgumentRequired?Data TypeDescription
string_ref1YstringName of first column or first string literal to apply to the function
string_ref2YstringName of second column or second string literal to apply to the function

string_ref1, string_ref2

String literal, column reference, or expression whose elements you want to compare based on this function.

Required?Data TypeExample Value
YesString literal, column reference, or expression evaluating to a stringmyString1, myString2

Example - Simple string comparisons