Psalms 40:6-8

6 You do not want sacrifices and offerings. But you have made a hole in my ear to show that my body and life are yours. You do not ask for burnt offerings and sacrifices to take away sins.
7 Then I said, "Look, I have come. It is written about me in the book.
8 My God, I want to do what you want. Your teachings are in my heart."

Psalms 40:6-8 Meaning and Commentary

To the chief Musician, a Psalm of David. Jarchi interprets this psalm of the Israelites, and of their deliverance and song at the Red sea. The title of it, in the Syriac version, is, "A psalm of David according to the letter, when Shemaiah brought the names of those who minister in the house of the Lord;" see 1 Chronicles 24:6; according to Kimchi, the subject of this psalm is the same with that of the two preceding; and R. Obadiah thinks it was composed by David, when he was recovered of a leprosy; but though it might be written by David, it was not written concerning himself, or on his own account, but of another. The title of this psalm is somewhat different from others in the order of the words; whereas it is usually put "a psalm of," or "for David"; here it is, "for David, a psalm"; and may be rendered, as Ainsworth observes, "a psalm concerning David"; not literally, but typically understood; not concerning David himself, but concerning his antitype and son, who is called by his name, Ezekiel 37:24; and that it is to be interpreted of him is evident from the application of Psalm 39:6, unto him by the apostle in Hebrews 10:5; and the whole of it is applicable to him; some apply it to Jeremiah in the dungeon, and others to Daniel in the den, as Theodoret observes.
Scripture taken from the New Century Version. Copyright © 1987, 1988, 1991 by Thomas Nelson, Inc. Used by permission. All rights reserved.