GT
Syntax
Description
Checks to see if the arguments in Column1 are greater than the arguments in Column2. Both columns must contain the same data type. GT then returns a Boolean value, either true if the arguments in Column1 are greater than the arguments in Column2 or false if the arguments in Column1 are not greater than the arguments in Column2. If one of the arguments is null, that value is lesser than other values, unless all arguments are null.
When comparing strings, first the characters are paired, then the Unicode value of these pairs are compared. If the character pairs are the same, the length of the string is compared. See COMPARE for more information, as these functions operate similarly.
Examples
Data field type | Column1 | Column2 | GT returns |
---|---|---|---|
Integer | 15 | 35 | false |
Integer | 23 | 23 | false |
Integer | 15 | null | true |
Float | 7.6 | 6.5 | true |
Float | 7.6 | 8.6 | false |
Float | null | 6.5 | false |
Date | Aug 2, 2011 3:55:03 PM | Oct 15, 2010 4:34:34 AM | true |
Date | Mar 2, 2002 1:24:12 PM | Mar 2, 2002 1:24:12 PM | false |
Date | Mar 2, 2002 1:24:12 PM | Apr 2, 2010 11:42:21 PM | false |
Date | Aug 2, 2011 3:55:03 PM | null | true |
Boolean | false | true | false |
Boolean | true | false | true |
Boolean | true | true | false |
Boolean | true | null | true |
String | Germany | George | true |
String | George | George | false |
String | German | Germany | false |
String | null | Germany | false |
null | null | false |
Instead of using a function, you could also use the equality operator >.