Tell that to the Israelis.
The US-Mexican border is "just a tad" longer than the sum of the various Israeli borders. Without strong laws and ACTIONS to discourage the things that encourage aliens to come here illegally, a fence will prove 1) expensive and 2) useless.
Key among these is strong enforcement actions on businesses who hire them (knowlingly OR unknowingly). The owners of said businesses should face stiff fines AND prison time.