Merck (NYSE:MRK) has given investors a lot of headaches lately. From Merck's and Schering-Plough's (NYSE:SGP) problems with Vytorin and Zetia to its own issues with the drug formally known as Cordaptive, Merck's investors have had good reason to push the stock down 35% since the beginning of the year.

But Merck was able to relieve some of those headaches on Friday by presenting pretty good data for its phase 3 migraine drug, telcagepant. The drug worked as well as AstraZeneca's (NYSE:AZN) Zomig in reducing pain and sensitivity to light and sound, but caused fewer unwanted side effects. Zomig and other migraine drugs like GlaxoSmithKline's (NYSE:GSK) Imitrex are associated with increased heart problems, including heart attacks in some patients, but the trial wasn't big enough to say for sure whether Merck's drug reduces the occurrence of these events.

The results presented came from a liquid-filled capsule, but Merck has reformulated the drug into a solid tablet, so it'll have to finish up clinical trials using the tablet form before applying for marketing approval with the FDA next year.

If it's approved, telcagepant could grab a significant piece of the migraine-treatment market. But it might need a head-to-head trial against Imitrex if Merck hopes to make a serious dent in the almost $1.4 billion in worldwide sales that Glaxo posted last year. Still, even a few hundred million dollars in sales would be a welcome addition to a drug arsenal that's seen its fair share of duds and backfires.

Merck has a long climb back into the dominant position it appeared to have mastered just six months ago, but at least the results of telcagepant should give investors some temporary relief from their pain.