@coldjoint,
Just to clarify the problem. It seems clear to me that President Trump has the legal ability to declare a National Emergency. I don't think a court will rule against him for that (although I may be wrong).
The problem is what happens next.
Declaring a National Emergency doesn't force Congress to appropriate the money for the wall. Instead, the National Emergency will allow Trump to divert money from other project (presumably military contracts).
The court cases (and public outcry) will be whether he can take money that was designated for projects (like military housing for example) to build his wall.
He will literally be siphoning money off from the military.... with the all the obvious legal and political issues this entails.