>how do i write one case for
>if the numebr is less than 7 digits but is not 411 or 911...
>to giveme 0.0
>
Put the 411 and 911 code that works in before this, and add this after them, but before the OTHERWISE. The DO CASE...ENDCASE is processed sequentially top to bottom, and you fall out of the block once you've satisfied a condition tested by a CASE.
CASE LEN(ALLTRIM(CHRTRAN(view1.dialednr, '-',''))) < 7
lnResult = 0