>Dear Experts
>
>I have table1 contaning only one CHARACTER field entitled "class".
>It has data as follows
>
>3000-5000
>5001-10633
>10634-13216
>10217-100000
>
>and there is NUMERIC textbox. It is equal to 12850
>
>How to check inwhich class it belongs to?
>It belongs to or it is in third class, 10634-13216, but how to check programtically?
>
>Please help
SELECT YourTableAlias
SCAN
lnPos = AT([-], Field1)
lnLow = VAL(LEFT(Field1, lnPos-1))
lnHigh = VAL(SUBSTR(Field1, lnPos+1)
IF BETWEEN(NumericTextBox.Value,lnLow,lnHigh)
HERE
ENDIF
ENDSCAN
or
#define lnPos AT([-], Field1)
#define lnLow VAL(LEFT(Field1, lnPos-1))
#define lnHigh VAL(SUBSTR(Field1, lnPos+1)
m.Number = NumericTextBox.Value
SELECT Field1 FROM YourTable WHERE BETWEEN(m.Number, lnLow, lnHigh) INTO ...
(not tested)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.