New American Standard Bible (NASB)
Ecclesiastes 8
12 Although a sinner does evil a hundred times and may lengthen his life, still I know that it will be well for those who fear God, who fear Him openly.
13 But it will not be well for the evil man and he will not lengthen his days like a shadow, because he does not fear God.
14 There is futility which is done on the earth, that is, there are righteous men to whom it happens according to the deeds of the wicked. On the other hand, there are evil men to whom it happens according to the deeds of the righteous. I say that this too is futility.
15 So I commended pleasure, for there is nothing good for a man under the sun except to eat and to drink and to be merry, and this will stand by him in his toils throughout the days of his life which God has given him under the sun.
16 When I gave my heart to know wisdom and to see the task which has been done on the earth (even though one should never sleep day or night),
17 and I saw every work of God, I concluded that man cannot discover the work which has been done under the sun. Even though man should seek laboriously, he will not discover; and though the wise man should say, "I know," he cannot discover.
Ecclesiastes 9
1 For I have taken all this to my heart and explain it that righteous men, wise men, and their deeds are in the hand of God. Man does not know whether it will be love or hatred; anything awaits him.
2 It is the same for all. There is one fate for the righteous and for the wicked; for the good, for the clean and for the unclean; for the man who offers a sacrifice and for the one who does not sacrifice. As the good man is, so is the sinner; as the swearer is, so is the one who is afraid to swear.
3 This is an evil in all that is done under the sun, that there is one fate for all men. Furthermore, the hearts of the sons of men are full of evil and insanity is in their hearts throughout their lives. Afterwards they go to the dead.
4 For whoever is joined with all the living, there is hope; surely a live dog is better than a dead lion.
5 For the living know they will die; but the dead do not know anything, nor have they any longer a reward, for their memory is forgotten.