NET
26 For to the one who pleases him, God gives wisdom, knowledge, and joy, but to the sinner, he gives the task of amassing wealth—only to give it to the one who pleases God. This task of the wicked is futile—like chasing the wind!
Darby
26 For he giveth to a man that is good in his sight wisdom, and knowledge, and joy; but to the sinner he giveth travail to gather and to heap up, that he may give to him that is good in God's sight. This also is vanity and pursuit of the wind.
KJV
26 For [God] giveth to a man that [is] good in his sight wisdom, and knowledge, and joy: but to the sinner he giveth travail, to gather and to heap up, that he may give to [him that is] good before God. This also [is] vanity and vexation of spirit.