Ecclesiastes 2:18

2:18 I hated all my labor in which I labored under the sun, seeing that I must leave it to the man who comes after me.
-World English Bible

Other Translation

2: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.
-King James Version