Only the LORD give thee wisdom and understanding, and give thee charge concerning Israel, that thou mayest keep the law of the LORD thy God. Then shalt thou prosper, if thou takest heed to fulfil the statutes and judgments which the LORD charged Moses with concerning Israel: be strong, and of good courage; dread not, nor be dismayed.
Deuteronomy 17:18-20
And it shall be, when he sitteth upon the throne of his kingdom, that he shall write him a copy of this law in a book out of that which is before the priests the Levites: And it shall be with him, and he shall read therein all the days of his life: that he may learn to fear the LORD his God, to keep all the words of this law and these statutes, to do them: That his heart be not lifted up above his brethren, and that he turn not aside from the commandment, to the right hand, or to the left: to the end that he may prolong his days in his kingdom, he, and his children, in the midst of Israel.
David's charge to Solomon reproduces the Deuteronomy 17 royal Torah obligation in full: wisdom, keeping the law, fulfilling statutes and judgments, courage, and no dismay. The specific statutory language — 'statutes and judgments which the LORD charged Moses' — identifies this as a direct citation of the Deuteronomic royal code. The prosperity promise attached to compliance and the 'be strong and of good courage' formula further mirror the Deuteronomic succession language, establishing David's charge as a statutory application of the royal Torah obligation to the Solomonic succession.