كتاب الأيمان
27  
The Book of Oaths
(5)
Chapter: Saying: "If Allah wills" when swearing oaths and at other times
(5)
باب الاِسْتِثْنَاءِ ‏‏
Sahih Muslim 1654 e

Abu Huraira reported Allah's Apostle (ﷺ) as saying that Sulaiman b. Dawud (once) said:

I will go round in the night to my ninety wives, and every one of them will give birth to a child (who will grow up) as a horseman and fight in the cause of Allah His companions said to him: Say" Insha' Allah." but he did not say Inshii' Allah. He went round all of them but none of them became pregnant but one, and she gave birth to a premature child. And by Him in Whose hand is the life of Muhammad, if he had said, Insha' Allah (his wives would have given birth to the children who would all have grown up into horsemen and fought in the way of Allah).
وَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا شَبَابَةُ، حَدَّثَنِي وَرْقَاءُ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ قَالَ سُلَيْمَانُ بْنُ دَاوُدَ لأَطُوفَنَّ اللَّيْلَةَ عَلَى تِسْعِينَ امْرَأَةً كُلُّهَا تَأْتِي بِفَارِسٍ يُقَاتِلُ فِي سَبِيلِ اللَّهِ ‏.‏ فَقَالَ لَهُ صَاحِبُهُ قُلْ إِنْ شَاءَ اللَّهُ ‏.‏ فَلَمْ يَقُلْ إِنْ شَاءَ اللَّهُ ‏.‏ فَطَافَ عَلَيْهِنَّ جَمِيعًا فَلَمْ تَحْمِلْ مِنْهُنَّ إِلاَّ امْرَأَةٌ وَاحِدَةٌ فَجَاءَتْ بِشِقِّ رَجُلٍ وَايْمُ الَّذِي نَفْسُ مُحَمَّدٍ بِيَدِهِ لَوْ قَالَ إِنْ شَاءَ اللَّهُ ‏.‏ لَجَاهَدُوا فِي سَبِيلِ اللَّهِ فُرْسَانًا أَجْمَعُونَ ‏"‏ ‏.‏
Reference : Sahih Muslim 1654e
In-book reference : Book 27, Hadith 36
USC-MSA web (English) reference : Book 15, Hadith 4070
  (deprecated numbering scheme)