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 |
---|---|---|---|
15 | 35 | false | |
23 | 23 | false | |
Integer | 15 | null | true |
7.6 | 6.5 | true | |
7.6 | 8.6 | false | |
Float | null | 6.5 | false |
Aug 2, 2011 3:55:03 PM | Oct 15, 2010 4:34:34 AM | true | |
Mar 2, 2002 1:24:12 PM | Mar 2, 2002 1:24:12 PM | false | |
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 |
false | true | false | |
true | false | true | |
true | true | false | |
Boolean | true | null | true |
Germany | George | true | |
George | George | false | |
German | Germany | false | |
String | null | Germany | false |
null | null | false |
Instead of using a function, you could also use the equality operator >.