That's a really interesting comparison, so let's measure the characters against the definition of a hero:
According to Google Dictionary, a hero is "a person who is admired or idealized for courage, outstanding achievements, or noble qualities."
There is actually a great deal of debate out there concerning whether either of these two men is a hero, and if so, what type of hero he is.
Let's look at Hamlet first. Is he courageous? I'd say no. He spends the great majority of the play trying to decide whether to move forward with his plans or not. When his father comes to him as a ghost and asks Hamlet to avenge his death, Hamlet isn't filled with courage (like his foil Fortinbras is). Has he achieved greatness? I'd again say no. He hasn't done anything especially noteworthy, though he does eventually kill Claudius as asked. Can we call him noble? Probably not. He murders Polonius in a hasty error and drives Ophelia mad by toying with her emotions throughout the play.
Oedipus, in contrast, acts courageously. When he hears of the prophecy, he immediately abandons the people he believes are his parents in order to overcome fate. In the end, he has the courage to gouge out his own eyes as self-inflicted punishment for his actions. He's also achieved greatness. He solved the riddle of the Sphinx and went on to become the leader of Thebes. Is he noble? This one is a little less certain. He did try to overcome the prophecy, but he did marry his own mother and commit murder—of his father, no less—and of several other men. His actions at the end seem to redeem a bit of this poor judgement, but the facts remain that he doesn't always act nobly.
Thus, I'd say that Oedipus is the stronger hero, because he clearly possesses the courage and greatness that Hamlet lacks.