Sahih Muslim , Book 15, Hadith 4067 (USC-MSA) ⓘ
Abu Huraira reported Allah's Prophet as saying that Sulaiman b. Dawud, the Messenger of Allah, observed: I will have an intercourse with seventy wives during the night; all of them will give birth to a male child who will fight in the cause of Allah. His companion or the ang I said to him: Say," If God wills." But he (Hadrat Sulaimin) did not say so, and he forgot it. And none of his wives gave birth to a child, but one who gave birth to a premature child. Allah's Messenger said: Had he said Insha' Allah (if God so will). he would not have failed and his desire would have been materialised.
وَحَدَّثَنَا مُحَمَّدُ بْنُ عَبَّادٍ، وَابْنُ أَبِي عُمَرَ، - وَاللَّفْظُ لاِبْنِ أَبِي عُمَرَ - قَالاَ حَدَّثَنَا سُفْيَانُ، عَنْ هِشَامِ بْنِ حُجَيْرٍ، عَنْ طَاوُسٍ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " قَالَ سُلَيْمَانُ بْنُ دَاوُدَ نَبِيُّ اللَّهِ لأَطُوفَنَّ اللَّيْلَةَ عَلَى سَبْعِينَ امْرَأَةً كُلُّهُنَّ تَأْتِي بِغُلاَمٍ يُقَاتِلُ فِي سَبِيلِ اللَّهِ . فَقَالَ لَهُ صَاحِبُهُ أَوِ الْمَلَكُ قُلْ إِنْ شَاءَ اللَّهُ . فَلَمْ يَقُلْ وَنَسِيَ . فَلَمْ تَأْتِ وَاحِدَةٌ مِنْ نِسَائِهِ إِلاَّ وَاحِدَةٌ جَاءَتْ بِشِقِّ غُلاَمٍ " . فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " وَلَوْ قَالَ إِنْ شَاءَ اللَّهُ . لَمْ يَحْنَثْ وَكَانَ دَرَكًا لَهُ فِي حَاجَتِهِ " .
also referenced under: Book 27, Hadith 34 (In-Book) & Hadith 1654 (Reference)