>>mval3=substr(mval2,1,at(' ',mval2))
>>Here is error - you wll have 'ABC ', not 'ABC'
>>'left' function better here.
Vlad is correct about the space.
left can work as could
mval3=substr(mval2,1,at(' ',mval2)-1)
or
mval3=alltrim(substr(mval2,1,at(' ',mval2)
Lots of ways to skin a cat... which is "better" who knows? < vbg >
Tom Gahagan
Alliance
Computer Solutions
"Music, like sex, is much too important to be left to professionals."
Robert Shaw