What is your defenition of 'nearest' in this case?
>
>Table1 has only one field as
>
>code c(7)
>
>data in table as
>
>1
>11
>1101
>1101001
>1101002
>1101005
>1101025
>1101048
>
>If m.var1=1101045 then
>How to findout nearest value against m.var1
>
>I need answer 1101025
>
>Please help
--sb--