Ecclesiastes 2:26
King James Version
“For giveth to a man that 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 good before God. This also vanity and vexation of spirit.”
Context
23For all his days sorrows, and his travail grief; yea, his heart taketh not rest in the night. This is also vanity.
24nothing better for a man, that he should eat and drink, and he should make his soul enjoy good in his labour. This also I saw, that it from the hand of God.
25For who can eat, or who else can hasten more than I?
26For giveth to a man that 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 good before God. This also vanity and vexation of spirit.