וַיֹּ֤אמֶר יְהוָה֙ אֶל־דָּוִ֣יד אָבִ֔י יַ֗עַן אֲשֶׁ֤ר הָיָה֙ עִם־לְבָ֣בְךָ֔ לִבְנ֥וֹת בַּ֖יִת לִשְׁמִ֑י הֱֽטִיב֔וֹתָ כִּ֥י הָיָ֖ה עִם־לְבָבֶֽךָ׃
But the LORD said unto David my father: Whereas it was in thy heart to build a house for My name, thou didst well that it was in thy heart;
Duties of the Heart
Hence, one commandment, according to the heart and intent with which it is performed, can outweigh many commandments, and likewise one transgression can outweigh many transgressions. Even the thought to do a commandment and the yearning to do it out of reverence for G-d, despite that one was unable to actually perform it, may, nevertheless, outweigh many commandments performed without this reverence, as G-d said to David: "because it was in your heart to build a house for My Name" (Chronicles II 6:8), and "then the G-d fearing men spoke to one another, and the L-ord hearkened and heard it. And a book of remembrance was written before Him for those who feared the L-ord and for those who thought upon His Name" (Malachi 3:16), and our Sages expounded the last words (Shabbat 63a): "what is meant by 'thought upon His Name?' - [answer:] "if one intended to fulfill a commandment but was prevented from doing it, it is accounted to him as if he had done it."