Difference between revisions of "SET NEAR"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Sets ’soft’ seeking of data
 
Sets ’soft’ seeking of data
 
  
 
==Syntax==
 
==Syntax==
 
SET NEAR ON | OFF | (<expL>)
 
SET NEAR ON | OFF | (<expL>)
 
  
 
==See Also==
 
==See Also==
[[FIND]], [[INDEX]], [[SEEK]], [[SET SOFTSEEK]], [[SOUNDEX()]]
+
[[INDEX]], [[SEEK]], [[SET SOFTSEEK]], [[SOUNDEX()]]
 
+
  
 
==Description==
 
==Description==
 
When SET NEAR is ON, searches of the table go to the record immediately following the potential location of the search key in the relevant file, if the key itself is not found.  SET NEAR is synonymous with SET SOFTSEEK.  Both SET NEAR and SET SOFTSEEK function when any valid expression is used with the SEEK command.  It has no effect on relationships.  By default, NEAR is OFF.
 
When SET NEAR is ON, searches of the table go to the record immediately following the potential location of the search key in the relevant file, if the key itself is not found.  SET NEAR is synonymous with SET SOFTSEEK.  Both SET NEAR and SET SOFTSEEK function when any valid expression is used with the SEEK command.  It has no effect on relationships.  By default, NEAR is OFF.
 
  
 
==Example==
 
==Example==
Line 34: Line 30:
 
.T.</code>
 
.T.</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]

Revision as of 06:07, 10 February 2012

Purpose

Sets ’soft’ seeking of data

Syntax

SET NEAR ON | OFF | (<expL>)

See Also

INDEX, SEEK, SET SOFTSEEK, SOUNDEX()

Description

When SET NEAR is ON, searches of the table go to the record immediately following the potential location of the search key in the relevant file, if the key itself is not found. SET NEAR is synonymous with SET SOFTSEEK. Both SET NEAR and SET SOFTSEEK function when any valid expression is used with the SEEK command. It has no effect on relationships. By default, NEAR is OFF.

Example

set near on
use demo
select state
seek "MB"
? found()
.F.
? eof()
.F.
? state
MD
set near off
seek "MB"
? found()
.F.
? eof()
.T.