>What is your defenition of 'nearest' in this case?
>
>Dear Sir,
>
>I told it in my example.
>
>Suppose the data is as
>
>5
>6
>8
>9
>
>If text1 is equal to 7 then I want to get 6.
>I do not want 8
You can use Set Near with a Descending index expression.
hth
-Stefan
CREATE CURSOR temp (test Int)
INSERT INTO temp VALUES (5)
INSERT INTO temp VALUES (6)
INSERT INTO temp VALUES (8)
INDEX on test TAG testdesc DESCENDING
SET NEAR ON
? SEEK(7)
? temp.test