Ecclesiastes 2:17-26 World English Bible (WEB)
17 So I hated life, because the work that is worked under the sun was grievous to me; for all is vanity and a chasing after wind. 18 I hated all my labor in which I labored under the sun, because I must leave it to the man who comes after me. 19 Who knows whether he will be a wise man or a fool? Yet he will have rule over all of my labor in which I have labored, and in which I have shown myself wise under the sun. This also is vanity.
20 Therefore I began to cause my heart to despair concerning all the labor in which I had labored under the sun. 21 For there is a man whose labor is with wisdom, with knowledge, and with skillfulness; yet he shall leave it for his portion to a man who has not labored for it. This also is vanity and a great evil. 22 For what has a man of all his labor, and of the striving of his heart, in which he labors under the sun? 23 For all his days are sorrows, and his travail is grief; yes, even in the night his heart takes no rest. This also is vanity. 24 There is nothing better for a man than that he should eat and drink, and make his soul enjoy good in his labor. This also I saw, that it is from the hand of God. 25 For who can eat, or who can have enjoyment, more than I? 26 For to the man who pleases him, God gives wisdom, knowledge, and joy; but to the sinner he gives travail, to gather and to heap up, that he may give to him who pleases God. This also is vanity and a chasing after wind.
Ecclesiastes 2:17-26 New American Standard Bible (NASB)
17 So I hated life, for the work which had been done under the sun was [a]grievous to me; because everything is futility and striving after wind.
The Futility of Labor
18 Thus I hated all the fruit of my labor for which I had labored under the sun, for I must leave it to the man who will come after me. 19 And who knows whether he will be a wise man or a fool? Yet he will have [b]control over all the fruit of my labor for which I have labored by acting wisely under the sun. This too is vanity. 20 Therefore I [c]completely despaired of all the fruit of my labor for which I had labored under the sun. 21 When there is a man who has labored with wisdom, knowledge and skill, then he gives his [d]legacy to one who has not labored with them. This too is vanity and a great evil. 22 For what does a man get in all his labor and in [e]his striving with which he labors under the sun? 23 Because all his days his task is painful and grievous; even at night his [f]mind does not rest. This too is vanity.
24 There is nothing better for a man than to eat and drink and [g]tell himself that his labor is good. This also I have seen that it is from the hand of God. 25 For who can eat and who can have enjoyment without [h]Him? 26 For to a person who is good in His sight He has given wisdom and knowledge and joy, while to the sinner He has given the task of gathering and collecting so that he may give to one who is good in God’s sight. This too is vanity and striving after wind.