U.S. stocks ended flat on Thursday, dropping off earlier highs as a weak U.S. bond auction and global debt concerns continued to weigh on investor sentiment.

Indexes advanced for most of the session, with the Dow and S&P hitting fresh 18-month highs, but their gains mostly disappeared after the auction of seven-year notes and comments from European Central Bank President Jean-Claude Trichet on issues surrounding Greece's sovereign debt.

Trichet told France's Public Senat television that if the IMF or some other body exercises the responsibility in lieu of the Eurogroup or instead of governments, it is evidently very, very bad.

We are losing our stock gains because of the threat of rising U.S. yields and the weakening of the euro, said Tom Sowanick, chief investment officer of the Omnivest Group in Princeton, New Jersey.

The session's early gains came after both Qualcomm and Best Buy gave bullish profit outlooks, an encouraging sign ahead of the upcoming earnings season.

The Dow Jones industrial average <.DJI> was up 5.06 points, or 0.05 percent, to end at 10,841.21. But the Standard & Poor's 500 Index <.SPX> was down 1.99 points, or 0.17 percent, at 1,165.73. And the Nasdaq Composite Index <.IXIC> was down 1.35 points, or 0.06 percent, at 2,397.41.

ORACLE DROPS AFTER THE BELL

Oracle Corp shares slipped 0.7 percent to $25.86 in extended trading after reporting adjusted third-quarter earnings that beat expectations by a penny. The stock, which is near a nine-year high, had jumped 1.1 percent in regular trading to end at $26.04 on Nasdaq.

Wall Street watches Oracle's results closely to determine whether corporate technology spending is on the mend.

Kim Caughey, senior analyst at Fort Pitt Capital Group, said Oracle did well this quarter, but what I'm most interested in is their plan for Sun, because that it a lower-margin business than they are used to being in, and it did drag the margins down somewhat.

As for the late slump in Oracle's stock, Caughey said, People don't now how to figure out if they did OK or not because of the Sun acquisition. It's a confusing thing at this point.

Oracle, one of the world's largest software makers, bought Sun Microsystems for $7.5 billion as a way to get into the hardware business for the first time.

BANKS CLIMB, QUALCOMM SOARS

During the regular session, Bank of America Corp ended 1 percent higher at $17.74 while peer bank Citigroup , the most active stock on the New York Stock Exchange, ended up 2.9 percent at $4.27. Earlier, Bloomberg News reported that the U.S. Treasury could unveil a plan next month for the sale of its stake in the bank.

Banks are among the best performers this year and were one of the few sectors to rise on Wednesday when markets fell on fears related to global sovereign debt.

Wireless chip maker Qualcomm Inc gained 5 percent to $42.19 on Nasdaq after raising its second-quarter earnings outlook while Best Buy advanced 3.6 percent to $42.66 on the New York Stock Exchange after a better-than-expected outlook and results.

Since the outlooks are obviously forward looking, they're signs of encouraging things to come, said Peter Lewis, fund manager at Murphy Capital Management in Gladstone, New Jersey. We continue to expect strong earnings this season.

First-quarter S&P 500 earnings reports, due in the coming weeks, are forecast to show year-over-year gains of 36.6 percent, according to estimates compiled by Thomson Reuters.

Also on Thursday, data showed the number of U.S. workers filing new applications for unemployment insurance fell sharply last week.

About 10 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, above last year's estimated daily average of 9.65 billion.

Decliners outnumbered advancers by a ratio of 3 to 2 on the New York Stock Exchange, while on the Nasdaq, about eight stocks fell for every five that rose.

(Reporting by Ryan Vlastelica; Additional reporting by Jennifer Ablan; Editing by Jan Paschal)