Difference between revisions of "CONTAINS()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) (→Description) |
||
Line 16: | Line 16: | ||
The CONTAINS() function returns .T. (True) if the current record contains the specified character string, <expC>. | The CONTAINS() function returns .T. (True) if the current record contains the specified character string, <expC>. | ||
− | A case-insensitive search is performed on the current record's character fields. If the optional <expL> is .T. (True) or the optional <expN> is 1, memo fields are also | + | A case-insensitive search is performed on the current record's character fields. If the optional <expL> is .T. (True) or the optional <expN> is 1, memo fields are also checked, otherwise they are excluded from the search. |
Line 24: | Line 24: | ||
|<expC>||The character string to search for. | |<expC>||The character string to search for. | ||
|- | |- | ||
− | |<expL>||. | + | |<expL>||If .T. (True), memos are included in the search. |
|- | |- | ||
− | |<expN>||. | + | |<expN>||If 1, memos are included in the search. |
|- | |- | ||
|} | |} | ||
− | |||
==Example== | ==Example== |
Revision as of 12:07, 17 November 2010
Purpose
Function to perform a case-insensitive search of a record's character and (optionally) memo fields for a specified character string
Syntax
CONTAINS(<expC>,[<expL>|<expN>])
See Also
CHROVERLAP(), EMPTY(), EVALUATE(), EXPRCHECK(), FOR(), INDEX, INLIST(), INRANGE(), ISALPHA(), ISBLANK(), ISDIGIT(), MAX(), MAXVALUES(), MIN(), MINVALUES(), TYPE(), VARTYPE()
Description
The CONTAINS() function returns .T. (True) if the current record contains the specified character string, <expC>.
A case-insensitive search is performed on the current record's character fields. If the optional <expL> is .T. (True) or the optional <expN> is 1, memo fields are also checked, otherwise they are excluded from the search.
Parameters | Description |
---|---|
<expC> | The character string to search for. |
<expL> | If .T. (True), memos are included in the search. |
<expN> | If 1, memos are included in the search. |
Example
open database southwind use customers // Restrict index to records with a character field containing string "USA", memos excluded index on lower(companyname) for contains("USA",.F.)
Products
Recital Server, Recital