Ecclesiastes 6:3
2 God gives a man riches, property, and wealth so that he lacks nothing that his heart desires, yet God does not enable him to enjoy the fruit of his labor—instead, someone else enjoys it! This is fruitless and a grave misfortune. 3 Even if a man fathers a hundred children and lives many years, even if he lives a long, long time, but cannot enjoy his prosperity—even if he were to live forever—I would say, “A stillborn child is better off than he is.” 4 Though the stillborn child came into the world for no reason and departed into darkness, though its name is shrouded in darkness,
Ecclesiastes 9:4
3 This is the unfortunate fact about everything that happens on earth: The same fate awaits everyone. In addition to this, the hearts of all people are full of evil, and there is folly in their hearts during their lives—then they die. 4 But whoever is among the living has hope; a live dog is better than a dead lion. 5 For the living know that they will die, but the dead do not know anything; they have no further reward—and even the memory of them disappears.
Notes and References
"... Qohelet, like the Babylonian Dialogue, pits traditional but contrary sayings one against the other. Qohelet, too, would seem to draw its epigrams from ancient sources. Let us take as an example Ecclesiastes 9:4: “For it is better for a live dog than a dead lion.” The proposition seems true, as the sage explains in what follows. But it can hardly be reconciled with a saying found in 6:3: “Better than him (one who leaves his worldly goods to another) is the stillborn.” In other words, it is better for one who has never lived than for someone who lives a normal existence in this world. According to this statement, it is better to be dead than alive, whether we are speaking of a person, a dog, or a lion. That, however, is not the ultimate point. The ultimate idea is this: whoever relies on traditional wisdom will inevitably discover that its sayings contradict one another. Wisdom cannot serve as a guide to life because it is self-contradictory and can lead to divergent and even contrary conclusions ..."
Greenstein, Edward L. "Sages with a Sense of Humor: The Babylonian Dialogue between a Master and His Servant and the Book of Qohelet" in Clifford, Richard J. (ed.) Wisdom Literature in Mesopotamia and Israel (pp. 55-65) Society of Biblical Literature, 2007