David Wanted the Temple and God Counted the Want
Midrash Tehillim joins David's unbuilt Temple, Moses' Torah, Abraham's vision, and Doeg's wealth into a story about what God counts.
Table of Contents
Most people think God counts only what a person finishes. Midrash Tehillim, a medieval rabbinic collection on Psalms, says heaven also counts what a person wanted so badly that it became his name.
That is why David can stand beside a Temple he never built. Midrash Tehillim 30:4 says the psalm for the dedication of the House belongs to David, even though Solomon completed the building. Midrash Tehillim 29:1 hears David teaching Israel how to begin prayer with the God of Abraham, Isaac, and Jacob. Midrash Tehillim 52:6 places David opposite Doeg, the man who chose wealth, power, and Saul's favor over goodness.
David Stood Before an Unbuilt House
David wanted the Temple with the ache of a man who could already hear footsteps in its courtyards. He could imagine the song. He could imagine the smoke rising. He could imagine Israel bringing fear, gratitude, guilt, and joy into one holy place.
But he would not build it.
Midrash Tehillim 30:4 lingers on that wound. The psalm opens, "A psalm, a song for the dedication of the House, by David" (Psalm 30:1). The problem is obvious. David prepared. Solomon built. Stone met stone under another king's hand.
The midrash answers with a principle that is almost tender. If an Israelite intends to perform a commandment and cannot complete it, God counts the intention as if the deed was done. David's hands did not raise the walls, but his longing entered the dedication.
God Counted the Want
Rabbi Yehuda and Rabbi Nehemiah begin that same passage with a hard claim: punishment does not bear fruit. Goodness does. Sow righteousness, Hosea says, and reap faithful love (Hosea 10:12). Sin can damage a life, but goodness multiplies.
Then the sages picture God holding the scales. On one side are sins. On the other are merits. God inclines the balance toward mercy. Rabbi Yosei bar Hanina sharpens the image further: God snatches the bill of sins and lets the merits decide the case.
This is not cheap mercy. The midrash knows that actions matter. Laban only intended to destroy Jacob, and Scripture still says, "An Aramean tried to destroy my father" (Deuteronomy 26:5). A destructive will has weight. But for Israel, a holy will has weight too. David wanted the House and was prevented. Heaven did not throw that desire away.
Moses Became the Torah He Carried
The same logic names Moses. He did not invent Torah. He received it, guarded it, carried it down a mountain, broke tablets for Israel, climbed back into the cloud, pleaded again, and spent his life making divine words livable for a frightened people.
So Malachi can say, "Remember the Torah of Moses My servant" (Malachi 3:22). The Torah belongs to God, but Moses' care for it becomes inseparable from it. A person can be called by the thing that keeps him awake.
Midrash Tehillim 29:1 takes that care into prayer. Moses tells Israel, "When I proclaim the name of the Lord, give greatness to our God" (Deuteronomy 32:3). The people ask where to begin. The answer returns to Psalm 29: "Give to the Lord, O sons of the mighty." Begin with the patriarchs. Begin by saying God of Abraham, God of Isaac, God of Jacob.
Abraham Had to Choose a Future
That opening is not polite ancestry. It is a memory of pressure. Midrash Tehillim 29:1 returns to Abraham at the binding of Isaac, where God named the son slowly, painfully, as if each word tightened the rope: your son, your only one, whom you love, Isaac (Genesis 22:2).
Abraham had already heard another promise: "Through Isaac shall your seed be called" (Genesis 21:12). Now he heard a command that seemed to tear the promise open. The midrash imagines God later saying that Abraham was silent when he might have answered.
That silence becomes a plea for the future. When Abraham's children sin, God says, remember this moment and lift Your face toward them. Numbers blesses Israel with that lifted face (Numbers 6:26). Prayer begins with the patriarchs because prayer begins by standing inside their unfinished, unbearable commitments.
Doeg Trusted the Wrong Name
Midrash Tehillim 52:6 turns the picture dark. David looks at Doeg, Saul's Edomite servant, and sees a man who loves evil more than good. Doeg has access, status, and the king's ear. He can attach himself to power and call it wisdom.
The midrash answers with Jeremiah: let not the wise boast in wisdom, the mighty in might, or the rich in riches. Let the one who boasts boast in knowing God (Jeremiah 9:22-23). Wealth is not the problem because coins exist. Wealth becomes deadly when a person trusts it to give him a name that righteousness cannot challenge.
God showed Abraham the future through a smoking oven and a burning torch (Genesis 15:17). The torch became Torah. The oven became Gehinnom. Abraham saw that his descendants would suffer, and Rabbi Chanina bar Papa says he chose exile over the fire. He chose wandering pain over final ruin.
The House Was Built From Desire First
David, Moses, and Abraham stand together because each one is remembered by what he served. David served the House before he saw it built. Moses served Torah until Torah carried his name. Abraham served his children by choosing the survivable sorrow.
Doeg stands as the warning. A person can also be named by the wrong devotion. Power can name him. Wealth can name him. The favor of a frightened king can name him.
Midrash Tehillim's mercy is demanding. It says God sees the deed, the blocked deed, the intention, the loyalty underneath the intention, and the thing a person keeps choosing when no one has rewarded him yet. David never placed the final stone. Still, when the Temple was dedicated, his song was already waiting there.