You can't attack through that wall of sand
This reader suspects that it's simply a mistake for the the final version of the 4th-level Sor/Wiz spell wall of sand [conj] (Spell Compendium (Dec. 2005; Apr. 2013) 237) to imply that most creatures can make attacks through the total cover the spell's effect provides. (Like this answer suggests, the rules as written may permit some exceptional creatures to make attacks through this wall of sand spell's effect, but that's not nearly the volume of creatures the spell's description implies!)
This reader suspects the idea of attacking through the wall of sand spell's effect is an accidental holdover from the the two markedly different earlier versions of the spell through which anyone could make attacks… with sufficient effort.
For comparison, the original version of the 4th-level Sor/Wiz spell wall of sand [conj] (Player's Guide to Faerûn (Mar. 2004) 118) says, in part, that
It is possible to attack a character inside or on the far side of the wall of sand with a melee weapon, provided that the following criteria are met. First, the attacker must have a general idea where the target is within the wall (that is, she must have seen her target enter the wall recently). Secondly, the target must be no deeper into the wall than the reach of the attacker’s weapon (or, in the case of creatures on the far side of the wall, the wall itself must not be deeper than the attacker’s reach). Even then, the target benefits from cover and total concealment.
Similarly, the second version of the 4th-level Sor/Wiz spell wall of sand [conj] (Sandstorm (Mar. 2005) 127) says, in part, that
No form of physical attack can harm a wall of sand directly, but each 10-foot section has 2 hit points per inch of thickness for determining whether an attack passes through it. The wall reduces damage dealt by attacks that pass through it. It essentially absorbs damage, so attacks must deal more damage than the wall has hit points to have any effect on a target on the other side of the wall of sand. Breaches in the wall close immediately after the attack that made them passes through. The sand blocks line of effect for any fire spell. Creatures on the opposite side of the wall from an attack’s origin have total concealment against that attack.
Many wall spells that originally appeared in other publications were substantially changed—if not outright rewritten—by the Spell Compendium (cf. the spell wall of water). This spell is no exception.