Solomon viewed all his labor during his lifetime ("under the sun," Ecclesiastes 2:18) with despair, because there was no real permanence to its fruits. He could not take them with him. [source][source][source]
"A Jewish proverb says, "There are no pockets in shrouds."" [1][source]
Solomon would have no control over what he had accumulated or accomplished after he died, either ( Ecclesiastes 2:19). The idea so common today that a good job is more desirable than a bad job because it yields benefits the worker can enjoy is a very short-sighted, selfish view. It seems to contradict Solomon"s conclusion, but it does not. Solomon"s perspective was much broader and more altruistic. He was thinking about what long-range changes for good could come out of all human toil. [source][source][source]