Sunan an-Nasa'i, Book 35, Hadith 19 (Nasa'i 3806)

It was narrated from Abu Musa that the Prophet said:

"There is nothing on Earth that I swear an oath upon, and I see that something else is better, but I do that which is better."