NEW YORK (AP) _ Barnes & Noble Inc.'s second-quarter earnings rose from a year ago, boosted by strong results at its giant bookstores.

The New York-based company reported Thursday that its operating earnings were $9 million, or 8 cents a share, in the quarter ended July 31, compared with a loss of $9.68 million, or 8 cents a share, a year earlier.

Sales in the quarter were $727.17 million, up from $662.5 million a year earlier.

Barnes & Noble's results topped Wall Street analysts' estimates of 7 cents a share. The company's stock was off 87.50 cents at $23.87 1/2 in afternoon trading on the New York Stock Exchange.

The 1999 results exclude a $36 million gain in the quarter that came from the May initial public stock offering of barnesandnoble.com, in which Barnes & Noble holds a 40 percent share, and the partial sale of Chapters Inc.

The figures also exclude a $5 million loss to cover costs associated with Barnes & Noble's termination of its planned merger with Ingram Book Group, the nation's No. 1 book wholesaler.

Barnes & Noble said that sales at its superstores open at least a year, which is considered an industry gauge of performance, rose 6.6 percent, while same-store sales at B. Dalton shops, which are smaller and usually found in malls, declined 0.5 percent for the year.

For the six months ended July 31, the company's operating earnings were $6.5 million, or 6 cents a share, compared with a loss of $15.34 million, or 13 cents a share, a year earlier.

Sales for the first six months of the year were $1.45 billion, up from $1.32 billion.

Also Thursday, barnesandnoble.com announced plans to open a distribution center in Memphis, Tenn., that will employ more than 600 workers.