Ecclesiastes 2:18

New International Version Bible (NIV)
I hated all the things I had toiled for under the sun, because I must leave them to the one who comes after me.

Read Ecclesiastes 2:18 in other translations