Sophocles said this quote

Alas, how terrible is wisdomwhen it brings no profit to the man that's wise!This I knew well, but had forgotten it,else I would not have come here.