Most vacuums today are multi-purpose, meaning that they not only clean carpet and hard floors, they can do above floor work too, as well as be taken out to clean your car. You can easily find one vacuum that can handle all of your needs.
Upright vacuums that we have tested and highly recommend are the Dyson DC33, Miele S7, and LG Luv300B. If you want a canister vacuum, we recommend the Oreck Quest or Quest Pro, and most any of the Miele vacuums.
If you're on a budget, look at the Shark Navigator and Bissell Cleanview.