Ecclesiastes 2:18

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

Ecclesiastes 2:18 In-Context

16 For there is no remembrance of the wise more than of the fool for ever; seeing that which now is in the days to come shall all be forgotten. And how dieth the wise man? as the fool.
17 Therefore I hated life; because the work that is wrought under the sun is grievous unto me: for all is vanity and vexation of spirit.
18 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.
19 And who knoweth whether he shall be a wise man or a fool? yet shall he have rule over all my labour wherein I have laboured, and wherein I have shewed myself wise under the sun. This is also vanity.
20 Therefore I went about to cause my heart to despair of all the labour which I took under the sun.

Footnotes 1

The King James Version is in the public domain.