If these words are spoken to an unbeliever, the meaning would be: ‘Make the most of this life, for it is all you have got. Where you are going you cannot take anything with you, because you are about to be reduced to nothing by death.
How does it appear to the unbeliever that the believer fares in this life? He appears to be at peace with his lot, and content with his circumstances. He is going to the same grave but with eyes wide open. And yet he lives with gratitude to God, and is not unduly disturbed by the prospect of losing all that the worldling sets value on.
In what sense can there be said to be ‘no work, nor device, nor knowledge, nor wisdom, in the grave’ in the grave to which the believer is going? In the sense that the actions and decision that knowledge and wisdom prompted during this life are finished. They cannot reach back into a life that is past and somehow relive it. This is not to say that there is no more wisdom in mankind after he leaves this world, but Solomon is not addressing that subject.