7:1 A good name is better than precious ointment,
and the day of death than the day of birth.
2 It is better to go to the house of mourning
than to go to the house of feasting,
for this is the end of all mankind,
and the living will lay it to heart.
3 Sorrow is better than laughter,
for by sadness of face the heart is made glad.
4 The heart of the wise is in the house of mourning,
but the heart of fools is in the house of mirth.
5 It is better for a man to hear the rebuke of the wise
than to hear the song of fools.
6 For as the crackling of thorns under a pot,
so is the laughter of the fools;
this also is vanity.
7 Surely oppression drives the wise into madness,
and a bribe corrupts the heart.
8 Better is the end of a thing than its beginning,
and the patient in spirit is better than the proud in spirit.
9 Be not quick in your spirit to become angry,
for anger lodges in the bosom of fools.
10 Say not, “Why were the former days better than these?”
For it is not from wisdom that you ask this.
11 Wisdom is good with an inheritance,
an advantage to those who see the sun.
12 For the protection of wisdom is like the protection of money,
and the advantage of knowledge is that wisdom preserves the life of him who has it.
13 Consider the work of God:
who can make straight what he has made crooked?
14 In the day of prosperity be joyful, and in the day of adversity consider: God has made the one as well as the other, so that man may not find out anything that will be after him.
15 In my vain life I have seen everything. There is a righteous man who perishes in his righteousness, and there is a wicked man who prolongs his life in his evildoing. 16 Be not overly righteous, and do not make yourself too wise. Why should you destroy yourself? 17 Be not overly wicked, neither be a fool. Why should you die before your time? 18 It is good that you should take hold of this, and from that withhold not your hand, for the one who fears God shall come out from both of them.
19 Wisdom gives strength to the wise man more than ten rulers who are in a city.
20 Surely there is not a righteous man on earth who does good and never sins.
21 Do not take to heart all the things that people say, lest you hear your servant cursing you. 22 Your heart knows that many times you yourself have cursed others.
23 All this I have tested by wisdom. I said, “I will be wise,” but it was far from me. 24 That which has been is far off, and deep, very deep; who can find it out?
25 I turned my heart to know and to search out and to seek wisdom and the scheme of things, and to know the wickedness of folly and the foolishness that is madness. 26 And I find something more bitter than death: the woman whose heart is snares and nets, and whose hands are fetters. He who pleases God escapes her, but the sinner is taken by her. 27 Behold, this is what I found, says the Preacher, while adding one thing to another to find the scheme of things— 28 which my soul has sought repeatedly, but I have not found. One man among a thousand I found, but a woman among all these I have not found. 29 See, this alone I found, that God made man upright, but they have sought out many schemes.
8:1 Who is like the wise?
And who knows the interpretation of a thing?
A man's wisdom makes his face shine,
and the hardness of his face is changed.
2 I say:  Keep the king's command, because of God's oath to him.  3 Be not hasty to go from his presence. Do not take your stand in an evil cause, for he does whatever he pleases. 4 For the word of the king is supreme, and who may say to him, “What are you doing?” 5 Whoever keeps a command will know no evil thing, and the wise heart will know the proper time and the just way. 6 For there is a time and a way for everything, although man's trouble  lies heavy on him. 7 For he does not know what is to be, for who can tell him how it will be? 8 No man has power to retain the spirit, or power over the day of death. There is no discharge from war, nor will wickedness deliver those who are given to it. 9 All this I observed while applying my heart to all that is done under the sun, when man had power over man to his hurt.
10 Then I saw the wicked buried. They used to go in and out of the holy place and were praised  in the city where they had done such things. This also is vanity. 11 Because the sentence against an evil deed is not executed speedily, the heart of the children of man is fully set to do evil. 12 Though a sinner does evil a hundred times and prolongs his life, yet I know that it will be well with those who fear God, because they fear before him. 13 But it will not be well with the wicked, neither will he prolong his days like a shadow, because he does not fear before God.
14 There is a vanity that takes place on earth, that there are righteous people to whom it happens according to the deeds of the wicked, and there are wicked people to whom it happens according to the deeds of the righteous. I said that this also is vanity. 15 And I commend joy, for man has no good thing under the sun but to eat and drink and be joyful, for this will go with him in his toil through the days of his life that God has given him under the sun.
16 When I applied my heart to know wisdom, and to see the business that is done on earth, how neither day nor night do one's eyes see sleep, 17 then I saw all the work of God, that man cannot find out the work that is done under the sun. However much man may toil in seeking, he will not find it out. Even though a wise man claims to know, he cannot find it out. (ESV)