"And who is like Your people Israel, [a nation whom God went]" (2 Samuel 7:23). Rabbi Berekhiah said in the name of Rabbi Abba bar Kahana: One verse says "whom He went" (1 Chronicles 17:21), and another verse says "whom they went" (1 Chronicles 17:23). "Whom He went" — this is the Holy One, blessed be He; "whom they went" — these are Moses and Aaron. "And You established for Yourself Your people Israel, etc.," "And now, be willing and bless, etc." (1 Chronicles 17:22, 24, 27). Rabbi Yochanan said: The Holy One, blessed be He, said to David: "David, the cistern is not filled from its own digging unless you draw a channel to it from a nearby place. You too, stretch out your hand against the nations of the world, and you will be blessed." This is what is written: "And it came to pass afterward that David struck the Philistines, etc." (2 Samuel 8:1).
King David and the Cistern That Fills From a Nearby Spring
Midrash Shmuel 27:3
ומי כעמך ישראל וגו' [אשר הלכו אלהים] (שם שם כ"ג), רבי ברכיה בשם רבי אבא בר כהנא כתוב אחד אומר אשר הלך (דה"א י"ז כ"א), וכתוב אחר אומר אשר הלכו (שם ז' כ"ג), אשר הלך זה הקדוש ברוך הוא, אשר הלכו זה משה ואהרן, ותכונן לך את עמך ישראל וגו', ועתה הואל וברך וגו' (שם שם כ"ד כ"ט), אמר רבי יוחנן אמר לו הקדוש ברוך הוא לדוד דוד אין הבור מתמלא מחולייתה אלא אם כן משכו אמה ממקום קרוב, אף (ידי פושט) [אתה פשוט ידך] באומות העולם ואת מתברך, הה"ד ויהי אחרי כן ויך דוד את (הפלשתים) [פלשתים] וגו' (שמואל ב' ח' א').