So the following verse of Surat al-Baqarah revealed; "They ask you concerning wine and gambling. Say: In them is great sin...." Umar was then called and it was recited to him.
He said: O Allah, give us a satisfactory explanation about wine.
Then the following verse of Surat an-Nisa' was revealed: "O ye who believe! approach not prayers with a mind befogged...." Thereafter the herald of the Messenger of Allah (ﷺ) would call when the (congregational) prayer was performed: Beware, one who is drunk should not come to prayer. Umar was again called and it was recited to him).
He said: O Allah, give us a satisfactory explanation about wine. This verse was revealed: "Will ye not then abstain?" Umar said: We abstained.
In-book : Book 27, Hadith 2
English translation : Book 26, Hadith 3662