You really want to use a character field for telephone rather than numeric. One should only use a numeric when you plan to do calculations and why would you do math on something like a telephone number? If it was a character the solution is simple -- in the Foxworld "Dog" = "D" so if you seek "516" where the index is telephone than it will take you to the first "516". In exactly the same way
select * from telephonebook where number = substr(lcnumber,1,3)
show you all the telephone book entries with the same area code as lcNumber.
If you HAVE to use a numeric (like you plan to use logarithms on your telephone book or something) than one approach might be to have an index STR(number,7) and then seek on subst(str(lcMynumber)1,3) but really that is really silly!
>i have one table of telphone numbers having mumeric field and width 7. i have an index on it no i want to seek one value out of it which is memary variable and whose lenght is 3. whats it the way of seeking left of that perticular filed
>
>for example
>
>
>i want the telephone no starting from number 516 .
>
>what is the way.
>
>please help
>thanks in advance.
>Mohammed
James Beerbower
James Beerbower Enterprises
Frankfurt, Deutschland