Hebrew · Midrash Rabbah (Hebrew, Torat Emet)וַיֹּאמֶר לָבָן לְיַעֲקֹב (בראשית לא, נא), אָמַר רַבִּי יוֹחָנָן כָּזֶה שֶׁהוּא מוֹרֶה אֶת הַחֲנִית. (בראשית לא, נב): עֵד הַגַּל הַזֶּה וגו' לְרָעָה אֵין אַתָּה עוֹבֵר אֲבָל אַתָּה עוֹבֵר עָלַי בִּפְרַגְמַטְיָא, בְּשָׁעָה שֶׁשָּׁלַח דָּוִד אֶת יוֹאָב לַאֲרַם נַהֲרַיִם וְלַאֲרַם צוֹבָה פָּגַע בַּאֲדוֹמִיִים, בִּקֵּשׁ לְזַנְבָן, הוֹצִיאוּ לוֹ אַפִּיסְטוֹלִי שֶׁלָּהֶם (דברים ב, ג): רַב לָכֶם סֹב אֶת הָהָר וגו'. פָּגַע בַּמּוֹאָבִיִּים בִּקֵּשׁ לְזַנְבָן וְהוֹצִיאוּ לוֹ אַפִּיסְטוֹלִי שֶׁלָהֶם (דברים ב, ט): אַל תָּצַר אֶת מוֹאָב וְאַל תִּתְגָּר בָּם מִלְחָמָה, בְּאוֹתָהּ שָׁעָה שָׁלַח יוֹאָב אֵצֶל דָּוִד אָמַר לוֹ פָּגַעְתִּי בַּאֲדוֹמִיִּים וּבִקַּשְׁתִּי לְזַנְבָן הוֹצִיאוּ לִי אַפִּיסְטוֹלִי שֶׁלָּהֶם רַב לָכֶם, בַּמּוֹאָבִיִּים וְהוֹצִיאוּ לִי אַפִּיסְטוֹלִי שֶׁלָּהֶם אַל תָּצַר אֶת מוֹאָב, בְּאוֹתָהּ שָׁעָה לֹא נָהַג דָּוִד כְּבוֹד מַלְכוּת בְּעַצְמוֹ אֶלָּא עָמַד וְהֶעֱבִיר פִּיפוּרִין מֵעָלָיו וַעֲטָרָה מֵעַל רֹאשׁוֹ וְנִתְעַטֵּף בְּטַלִּיתוֹ וְהָלַךְ לוֹ אֵצֶל סַנְהֶדְּרִין, אָמַר לָהֶם רַבּוֹתַי לֹא בָּאתִי לְכָאן אֶלָּא לְלַמֵּד אִם נוֹתְנִים אַתֶּם לִי רְשׁוּת אֲנִי מְלַמֵּד, שָׁלַחְתִּי אֶת יוֹאָב לַאֲרַם נַהֲרַיִם וְלַאֲרַם צוֹבָא וּפָגַע בַּאֲדוֹמִיִּים וְהוֹצִיאוּ לוֹ אַפִּיסְטוֹלִי שֶׁלָּהֶן רַב לָכֶם, וַהֲלוֹא הֵם פָּרְצוּ אֶת הַגָּדֵר תְּחִלָּה (שופטים ג, יג): וַיֶּאֱסֹף אֵלָיו אֶת בְּנֵי עַמּוֹן, פָּגַע בַּמּוֹאָבִיִּים וּבִקֵּשׁ לְזַנְבָן וְהוֹצִיאוּ לוֹ אַפִּסְטוֹלִי שֶׁלָּהֶן אַל תָּצַר אֶת מוֹאָב, וְהֵם לֹא פָּרְצוּ הַגָּדֵר תְּחִלָּה (במדבר כב, ה ו): וַיִּשְׁלַח מַלְאָכִים אֶל בִּלְעָם וְעַתָּה לְכָה אָרָה לִי, הֲדָא הוּא דִכְתִיב (תהלים ס, א): מִכְתָּם, כַּמָּה אִגְרוֹת כָּתַב, רַבִּי אַיְּבוּ אָמַר שְׁתַּיִם כָּתַב, אֶחָד לָאֲדוֹמִיִּים וְאֶחָד לַמּוֹאָבִיִּים. רַבִּי חֲנִינָא אָמַר אִגֶּרֶת אֶחָד כָּתַב, הֲדָא הוּא דִכְתִיב (במדבר כב, ב): וַיָּשָׁב יוֹאָב וגו', חָזַר וְלָמַד אֲדוֹמִיִּים מִשֶּׁל מוֹאָבִיִּים, הֲדָא הוּא דִכְתִיב (במדבר כב, א): לַמְנַצֵּחַ עַל שׁוּשַׁן עֵדוּת, לְעֵדָה שֶׁהִיא מְשִׂיחָה בִּלְשׁוֹנוֹ שֶׁל אֱלֹהִים. (במדבר כב, א): מִכְתָּם לְדָוִד לְלַמֵּד, מָכוּת וְתַמּוּת, (במדבר כב, ב): בְּהַצּוֹתוֹ אֶת אֲרַם נַהֲרַיִם וַיַּךְ אֶת אֱדוֹם בְּגֵיא מֶלַח, כָּתוּב אֶחָד אוֹמֵר (דברי הימים א יח, יב): י"ח אֶלֶף, וְכָתוּב אֶחָד אוֹמֵר (תהלים ס, ב): י"ב אֶלֶף, אֶלָּא שְׁתֵּי מִלְחָמוֹת הָיוּ, אַחַת שֶׁל י"ב אֶלֶף וְאַחַת שֶׁל י"ח אֶלֶף.
English · The Sefaria Midrash Rabbah (2022)“Laban said to Jacob: Here is this pile and here is the monument that I have established between me and you” (Genesis 31:51).
“Laban said to Jacob […the monument that I have established [yariti]]” – Rabbi Yoḥanan said: Like one who throws a spear.
“This pile is witness, and the monument is witness, that I will not pass this pile toward you, and that you will not pass this pile and this monument toward me, for harm” (Genesis 31:52).
“This pile is witness…” – for harm, you will not pass, but you will pass for commerce. When David dispatched Yoav to Aram Naharayim and Aram Tzova, he encountered Edomites. He sought to attack them. They produced for him their epistle: “Enough for you circling this mountain…[You are entering the border of your brothers, the children of Esau…Do not provoke them]” (Deuteronomy 2:3–5). He encountered the Moavites, he sought to attack them. They produced for him their epistle: “The Lord said to me: Do not besiege Moav, and do not provoke war with them” (Deuteronomy 2:9). At that moment, Yoav sent to David, he said to him: ‘I encountered the Edomites. I sought to attack them, but they produced their epistle: “Enough for you.” I encountered the Moavites. I sought to attack them, but they produced their epistle: “Do not besiege Moav.”’ At that moment, David did not conduct himself with the requisite royal dignity. He removed his royal garment of purple wool and the crown from his head, wrapped himself in his cloak and went to the Sanhedrin. He said to them: ‘My masters: I came here only to teach. If you give me permission, I will teach. I sent Yoav to Aram Naharayim and to Aram Tzova. He encountered the Edomites, but they produced their epistle: “Enough for you.” But, did they not breach the fence first? “He gathered to him the children of Amon [and Amalek]” (Judges 3:13). He encountered the Moavites. He sought to attack them, but they produced their epistle: “Do not besiege Moav.” But, did they not breach the fence first? “He sent messengers to Bilam…now, please come curse this people for me”’ (Numbers 22:5–6). That is what is written: “A letter [for David to teach]” (Psalms 60:1). How many letters did he write? Rabbi Aivu said: He wrote two; one regarding the Edomites and one regarding the Moavites. Rabbi Ḥanina said: He wrote one letter. That is what is written: “Yoav returned [and smote twelve thousand Edomites]” (Psalms 60:2); he returned and learned regarding the Edomites, from the Moavites. That is what is written: “For the chief musician on shushan edut” (Psalms 60:1) – to the assembly [le’eda] that speaks in the language of God. “A letter [mikhtam] for David to teach” (Psalms 60:1) – poverty [makhut] and faultlessness [tamut]; “when he contended with Aram Naharayim…and smote [twelve thousand] Edomites in the Salt Valley” (Psalms 60:2). One verse says: “Eighteen thousand” (I Chronicles 18:12), and one verse says: “Twelve thousand.” It is, rather, that there were two wars, one with twelve thousand and one with eighteen thousand.