On a tough day for drugstore stocks, Rite Aid (NYSE:RAD) reported decent second-quarter results Thursday. The company still stands a distant third in the industry, but better results and a giant acquisition could improve its fortunes.

The drugstore chains were hit as Wal-Mart (NYSE:WMT), in its quest for low-cost world dominance, announced it will be selling nearly 300 generic prescription drugs for a mere $4 a month. It's uncertain what the financial impact will be on other competitors, but the concern sent shockwaves through the share prices of retailers and pharmacy benefit managers (PBMs) such as Caremark (NYSE:CMX) and Medco (NYSE:MHS).

In the second quarter, Rite Aid's total revenue grew 3.8%; same-store sales also advanced 3.8%, which just happened to be the same number reported for August. Drugstores also report trends in their two primary sales platforms: prescriptions and "front end," or sales of on-the-go grocery and other basic consumer goods. Rite Aid's comparable pharmacy sales grew 4.7%, while front-end sales jumped 2.3%. The overall sales of $4.29 billion came in slightly ahead of analyst projections.

Unfortunately, the decent sales trends didn't flow to the bottom line, as the company posted a net loss of $300,000, or 2 cents per diluted share. Rite Aid also tends to report results on an EBITDA basis, possibly because interest expense is significant, what with the sizable amount of debt on the company's balance sheet. Overall, there are quite a few moving parts in the reported results; I'll refer you to the news release for further details.

Rite Aid recently said it intends to purchase 1,858 Brooks and Eckerd drugstores from Canadian-based Jean Coutu, which purchased most of the chains from J.C. Penney a couple of years ago. The purchase would move its total store count to about 5,200, which would still be behind larger rivals Walgreen (NYSE:WAG) and CVS (NYSE:CVS) in terms of stores and other financial metrics.

Time will tell whether the solid quarterly sales begin to trickle down to the bottom line and whether cost-cutting moves from the store acquisition will improve Rite Aid's overall competitiveness. But as it stands now, Walgreen is the most consistent and profitable operator, CVS is a close second and pursues acquisitions as a major growth avenue, and Rite Aid has posted more uneven sales and profitability recently.

For related Foolishness:

Wal-Mart is an Inside Value pick. Inside Value gives subscribers the big names with the best prospects for good returns. A free trial gives you all the picks and how they're doing.

Fool contributor Ryan Fuhrmann is long shares of Walgreen but has no financial interest in any other company mentioned. Feel free to email him with feedback or to discuss any companies mentioned further. The Fool has an ironclad disclosure policy.