Difference between revisions of "Relational Operators"
From Recital Documentation Wiki
		
		
		
Yvonnemilne  (Talk | contribs)  | 
				Yvonnemilne  (Talk | contribs)   | 
				||
| (One intermediate revision by one user not shown) | |||
| Line 47: | Line 47: | ||
| − | In   | + | In SQL statements, the following wildcard characters are available:  | 
| Line 58: | Line 58: | ||
|-  | |-  | ||
|}  | |}  | ||
| + | |||
Note: For FoxPro compatibility reasons, wildcard pattern matching is not available when [[SET COMPATIBLE]] is set to FOXPRO/FOXBASE/FOXPLUS/VFP.  | Note: For FoxPro compatibility reasons, wildcard pattern matching is not available when [[SET COMPATIBLE]] is set to FOXPRO/FOXBASE/FOXPLUS/VFP.  | ||
Latest revision as of 16:01, 5 July 2011
The following Relational Operators are supported in the Recital/4GL:
 
| Operator | Operation | 
|---|---|
| = | Equal To | 
| == | Exactly Equal To / Matches Pattern | 
| <> | Not Equal To | 
| != | Not Equal To | 
| # | Not Equal To | 
| > | Greater Than | 
| >= | Greater Than or Equal To | 
| < | Less Than | 
| <= | Less Than or Equal To | 
| $ | Substring is Contained In | 
| | | Contains Substring | 
The Relational Operators are always evaluated from left to right.
The following ’wildcard’ characters can be used for == pattern matching:
| Character | Action | 
|---|---|
| ? | Matches any one character | 
| % | Matches any one character | 
| * | Matches zero or more characters | 
In SQL statements, the following wildcard characters are available:
| Characters | Description | 
|---|---|
| _ | Matches any one character | 
| % | Matches zero or more characters | 
Note: For FoxPro compatibility reasons, wildcard pattern matching is not available when SET COMPATIBLE is set to FOXPRO/FOXBASE/FOXPLUS/VFP.
Example
cSTR1 = [Welcome to the Recital/4GL] ? "Recital" $ cSTR1 .T. cSTR2 = [Welcome] // Compares to the end of cSTR2 ? cSTR1 = cSTR2 .T. // Compare contents & size ? cSTR1 == cSTR2 .F.