King James Version (KJV)
Because David did {that which was} right in the eyes of the LORD, and turned not aside from any {thing} that he commanded him all the days of his life, save only in the matter of Uriah the Hittite.
Modern English
because David did that which was right in Yahweh’s eyes, and didn’t turn away from anything that he commanded him all the days of his life, except only in the matter of Uriah the Hittite.
Hebrew
אֲשֶׁ֨ר עָשָׂ֥ה דָוִ֛ד אֶת־הַיָּשָׁ֖ר בְּעֵינֵ֣י יְהוָ֑ה וְלֹֽא־סָ֞ר מִכֹּ֣ל אֲשֶׁר־צִוָּ֗הוּ כֹּ֚ל יְמֵ֣י חַיָּ֔יו רַ֕ק בִּדְבַ֖ר אוּרִיָּ֥ה הַחִתִּֽי׃
ʾasher ʿashah david ʾet-hayashar bʿeyney yhvah vloʾ-sar mikol ʾasher-ṣivahv kol ymey ḥayayv raq bidbar ʾvriyah haḥitiy