Abu Hurairah reported,

Sulayman bin Dawud, peace be upon them, said, "Tonight I shall go around to a hundred wives, and each one will bear a son who will fight in the cause of Allah."The angel said to him, "Say, 'If Allah wills.'"But he did not say it and forgot. He went around to all of them, and none of them bore a child except one woman, who delivered half a person.The Prophet ﷺ said, "Had he said, 'If Allah wills,' he would not have broken his oath, and it would have given him a better chance of attaining what he sought."

Bukhari 5242

Sahih

حدثني محمود حدثنا عبد الرزاق أخبرنا معمر عن ابن طاوس عن أبيه

عن أبي هريرة قال

قال سليمان بن داود عليهما السلام لأطوفن الليلة بمائة امرأة تلد كل امرأة غلاما يقاتل في سبيل الله فقال له الملك قل إن شاء الله فلم يقل ونسي فأطاف بهن ولم تلد منهن إلا امرأة نصف إنسان قال النبي ﷺ لو قال إن شاء الله لم يحنث وكان أرجى لحاجته

البخاري 5242صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Marriage
Chapter
A man saying "I will go around to my wives tonight"
Numbering
Darussalam 5242
Bukhari 5242