REETA1967
24th January 2003, 17:53
hi,

while writing sql command we use to write
like this
select dmoes200.slnm from dmoes200
where dmoes200._index1 inrange { ....}

if there is another index2 which contain two fields
clno,slno and i want to choose from second index.

select dmoes200.slnm from dmoes200
where dmoes200._index12.clno inrange { ....}

is this possible ???????

Bye

evesely
24th January 2003, 18:02
You can certainly select by the second index. However, your syntax was off (maybe it was just a typo). Try:


select dmoes200.slnm
from dmoes200
where dmoes200._index2 inrange { ....}

evertsen
24th January 2003, 18:53
If you are asking if you can use the first field of index2 only then the answer is yes. Use the code that evesely has posted and only specify one field in your range
e.g.

select dmoes200.slnm
from dmoes200
where dmoes200._index2 inrange {:clno.f} and {:clno.t}