Prefer knowledge to wealth, for the one is transitory, and the other perpetual.
Source, in full
Actually from Isocrates, it can be found on p. 213 of Classical Rhetoric in English, 1650-1800: A Critical Anthology, part of a 1703 translation of a letter Isocrates wrote to his friend Demonicus which begins on p. 210. Earliest source found attributing it to Socrates was an 1875 book called The Best Reading.