Ecclesiastes 2:18

Again, I detested all my efforts, by which I had earnestly labored under the sun, to be taken up by an heir after me

Other versions

King James Version

Yea, I hated all my labour which I had taken under the sun: because I should leave it unto the man that shall be after me.

English Standard Version

I hated all my toil in which I toil under the sun, seeing that I must leave it to the man who will come after me,

New International Version

I hated all the things I had toiled for under the sun, because I must leave them to the one who comes after me.