Everybody compares Iraq to Vietnam, but that is the wrong comparison. Everybody tries to frame this as a Democrat vs. Republican issue but both parties have made giant mistakes in past wars and occupations. Just a quick history for comparison:
The Spanish-American War was the first attempt to "nation build." After defeating Spain, we attempted to stabilize the Philippines and that went horribly wrong. It was so bad that in 1903 Teddy Roosevelt, a Democrat, finally just gave up and left the Philippines to fend for themselves.
After World War II, President Truman, a Democrat, endorsed the Marshall Plan but only for countries in Western Europe and that did not "appease" the Soviet Union during World War II. The Marshall plan basically left Eastern Europe, Austria, China, and southeast Asia to rebuild after war. We helped those countries against the Nazis and Japanese, but then determined they were outside our "sphere of influence" for aid.
After the Korean War, we had very limited success building up South Korea. President Eisenhower, a Republican, largely let South Korea run rampant with corruption and lawlessness. We were in South Korea for at least 25 years after the end of the Korean War helping maintain some semblence of law and order. South Korea only started functioning as a democratic state with a capitalist economy in the late 1970's.
These three cases illustrate that we are good at winning a war, but can't figure out how to build a nation. Additionally, just three years in Iraq is short compared to occupations/assistance after any other war.
240 mentioned that we should be out of Iraq because we accomplished our initial objectives. The problem is that our initial objectives did not address post-conflict nation building. Nobody, Democrat or Republican, mentioned that prior to hostilities. War is fast moving and objectives change based on the situation. I bet that, behind closed doors, the Middle East governments are glad that the US is still in Iraq because it does actually provide stability. If we pull out, chaos will ensue and the entire region would probably end in war.