By Michael Erman and Christy SanthoshAug 4 (Reuters) - Merck reported higher-than-expected second-quarter sales on Tuesday and raised its full-year revenue forecast on the strength of its top-selling cancer treatment Keytruda. Merck reported a loss for the quarter due to a $5.7 billion charge from its acquisition of cancer drug developer Terns Pharmaceuticals. Analysts had expected a larger adjusted loss per share of 27 cents, and Merck shares rose 0.6% to $128.54 in early trading. Sales of immunotherapy Keytruda, the world's top-selling prescription medicine, rose 5% to $8.37 billion in the quarter, including $463 million from its newer subcutaneous formulation, Keytruda QLEX. Animal health sales rose 8% ​to $1.78 billion, slightly ahead of Wall Street projections of $1.75 billion.