The S&P 500 added 3.48 points (0.18%) at 1 987.01, breaching a record set three weeks ago by about three points.
The Dow Jones Industrial Average dropped 26.91 (0.16%) to 17 086.63, dragged down by a hefty fall by Boeing.
The tech-rich Nasdaq Composite Index jumped 17.68 (0.40%) to 4 473.70.
"There's less talk of geopolitical concerns, whether it be in Gaza or Ukraine, and more discussion of fundamentals," said Art Hogan, chief market strategist at Wunderlich Securities.
"On balance, earnings have been better than expected."
Apple, the biggest publicly traded company in the US, gained 2.6% on the Nasdaq as profits for its fiscal third quarter rose 11.6% to $7.7bn due to strong demand for iPhones, particularly in China.
Boeing dropped 2.3%, the biggest Dow decliner, despite reporting second-quarter earnings that bested expectations by a wide margin and raising its full-year profit outlook. Analysts were troubled by a $272m after-tax charge for a US Air Force tanker contract.
Caterpillar, another Dow component, lost 1.5% as it disclosed lower industrial machine sales for the last three months. The biggest declines came in the resources sector, which fell 49% in April and 38% in June. Caterpillar is to report quarterly earnings Thursday before the equities markets open.
PepsiCo rose 1.9% as second-quarter earnings of $1.32 per share bested analyst expectations by nine cents and the beverage company raised its full-year profit forecast.
Other companies that reported earnings included Biogen (+11.2%), Delta Air Lines (+3.9%), Dow Chemical (+3.0%), Freeport-McMoRan (-0.4%), Northrop Grumman (+0.1%), Weatherford International (+1.7%) and Whirlpool (+1.4%).
In non-earnings news, Puma Biotechnology bolted 295.4% higher to $233.43 after a trial of its neratinib treatment for breast cancer resulted in a 33% improvement in disease-free survival of the survey population. The company plans to file for regulatory approval for the medication in the first half of 2015.
Bond prices were mixed. The yield on the 10-year US Treasury fell to 2.46% from 2.47% on Tuesday, while the 30-year held rose to 3.26% from 3.25%. Bond prices and yields move inversely.