If the United States does indeed build a wall along its southern border and then monitors it effectively, it may succeed in curbing illegal immigration, but it will not end it. Walls cannot prevent people from overstaying their visas or being smuggled in another way. And if history is any precedent, illegal immigrants may attempt to tunnel under the wall, go over it or breach it some other way.
As long as life in the United States offers potential migrants more opportunities and fewer perceived dangers than their home countries, illegal immigration will likely persist.
If a border wall provides the political space for addressing these more systemic problems, then it may still be a worthwhile investment. That said, the proposed wall on the U.S.-Mexico border—like all previous walls—should be viewed as a means to an end, rather than an end unto itself.