Perform a comparison between two strings.
SELECT StrComp(“SQL Tutorial”, “SQL Tutorial”) AS CompString; |
The StrComp() function compares two strings and returns an integer based on the comparison:
StrComp(string1, string2, compare) |
Parameter |
Description |
string1, string |
Required. Specifies the two strings that will be compared. |
compare |
Optional. Specifies the type of comparison to perform between the two strings. Possible values: -1: Uses the setting of Option Compare 0: Performs a binary comparison 1: Performs a textual comparison |
Works in: |
From Access 2000 |
Perform a comparison operation between two strings.
SELECT StrComp(“SQL Tutorial”, “SQL”) AS CompString; |
Perform a comparison operation between two strings.
SELECT StrComp(“SQL”, “SQL Tutorial”) AS CompString; |