Ecclesiastes 2:18-19

18 Yes, I hated all my labor which I had taken under the sun: because I should leave it to the man that shall be after me.

19 And who knows whether he shall be a wise man or a fool? yet shall he have rule over all my labor wherein I have labored, and wherein I have showed myself wise under the sun. This is also vanity.