Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

D toc

Excerpt

Returns true if the first string evaluates to be less than 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.

D s lang vs sql

D s
snippetBasic

String literal reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:stringlessthan('a','b') as:'stringCompare'

stringlessthan('a','b')

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

String literal reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:stringlessthan('a','ab') as:'stringCompare'

stringlessthan('a','ab')

Output: Returns true since the second string contains an additional letter.

String literal reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:stringlessthan('abc','x') as:'stringCompare'

stringlessthan('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:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:stringlessthan(string1,string2) as:'stringCompare'

stringlessthan(string1,string2)

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

D s
snippetCollation Rules
styleh2

Include Page
String Collation Rules
String Collation Rules

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:stringlessthan(string_ref1,string_ref2)

stringlessthan(string_ref1,string_ref2 [,ignore_case])


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
ignore_caseNstringWhen true, matching is case-insensitive. Default is false.

D s lang notes

string_ref1, string_ref2

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

D s
snippetusage

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

ignore_case

When true, matches are case-insensitive. Default is false

Info

NOTE: This argument is not required. By default, matches are case-sensitive.

Required?Data TypeExample Value
NoString literal evaluating to a Boolean'true'


D s
snippetExamples

Example - Simple string comparisons

Include Page
EXAMPLE - String Comparison Functions
EXAMPLE - String Comparison Functions

D s also
labelstring