Sony Corp <6758.T> posted a smaller-than-expected quarterly loss, helped by an improvement in its struggling flat TV business, and said it was aiming to beat its official forecast and at least break even for the full year.

Sony has fallen behind Apple Inc's iPod in portable music, Nintendo Co <7974.OS> in videogames, and is struggling to compete with Samsung Electronics Co Ltd <005930.KS> in LCD TVs.

But the company, which vies with Panasonic Corp <6752.T> for the position of the world's largest consumer electronics maker, said that losses on flat TVs had narrowed in the latest quarter, bringing the business close to the break even level.

The maker of Bravia flat TVs and Vaio PCs kept its operating loss forecast of 110 billion yen ($1.2 billion) for the year to March 31, 2010.

That is about half the 227.8 billion yen loss it racked up a year ago, and compares with the consensus of 117.7 billion yen loss according to a Reuters poll of 19 analysts.

But Sony said it was aiming to beat that.

We are keeping our official forecast but internally we are aiming to at least break even, Sony Chief Financial Officer Nobuyuki Oneda told a news conference.

With three quarters of its revenues earned overseas, Sony is vulnerable to the yen's appreciation, which makes Japanese exports less price competitive overseas at a time South Korean rivals are benefiting from a softer won.

Sony's operating loss came in at 25.7 billion yen in April-June, down from a profit of 73.44 billion yen a year earlier, and smaller than the average 103.1 billion yen loss forecast by five analysts.

It reported a net loss of 37.1 billion yen, a reversal from a 34.98 billion yen profit a year ago.

In contrast, South Korea's LG Electronics Inc <066570.KS> posted a record quarterly profit on strong TV and mobile phone sales, while Samsung beat market expectations with a 5 percent rise in quarterly net profit.

Sony has been restructuring its sprawling operations. It has announced plans to close eight manufacturing sites, cut 16,000 jobs and halve its 2,500 suppliers.

Sony is making changes to adapt to the environment but it still seems to be having trouble keeping up and perhaps should have been a bit more aggressive about cost-cutting, said Mitsushige Akino, chief fund manager at Ichiyoshi Investment Management.

Ahead of the results, Sony's shares closed up 6.8 percent at 2,505 yen, outperforming a 1.9 percent rise in the Tokyo stock market's electrical machinery index <.IELEC.T>. The stock has gained 17 percent since April through Wednesday, while the subindex put on 29 percent.

U.S.-listed shares of Sony were up sharply, rising 9.6 percent to $27.20 in afternoon New York trading.

(Reporting by Kiyoshi Takenaka; Editing by Anshuman Daga and Edwina Gibbs)