The oath of office and the oath of the military, is to The Constitution (to preserve & protect). The pledge is to swear allegiance to the flag. The flag is symbolic of the union of the several states and of the people therein. The Constitution of the United States and the constitutions of the several states are the fundamental law of this Union.
Let us, then, pledge allegiance to the Union, and let us swear to protect and uphold its fundamental law.
Excellent analysis of the important distinctions in play here, YHAOS. Thank you!