In this letter, we consider the distributed classification problem in wireless sensor networks. The DCSD approach employing the binary code matrix has recently been proposed to cope with the errors caused by both sensor faults and the effect of fading channels. However, the performance of the system employing the binary code matrix could be degraded if the distance between different hypotheses can not be kept large. In this letter, we design the DCSD approach employing the D-ary code matrix when log2D bits local decision information is used, where D>2. Simulation results show that the performance of the DCSD approach employing the D-ary code matrix is better than that of the DCSD approach employing the binary code matrix.