2 The king said to Joab the captain of the army, who was with him, "Now go back and forth through all the tribes of Israel, from Dan even to Beersheba, and number the people, that I may know the sum of the people."
*Minor differences ignored. Grouped by changes, with first version listed as example.
1-Chronicles 21:2, supplies some missing words. This passage should run, as at 2-Samuel 24:4, "And the king said to Joab and to the princes of the host who were with him," etc. (compare 1-Chronicles 27:22). They were employed "with Joab" as his assistants in the numbering, exactly as in the previous numbering Numbers 1:4 when a prince was appointed from each tribe to be "with" Moses and Aaron.
For the king said to Joab the captain of the host, which [was] with him, Go now through all the tribes of Israel, from Daniel even to Beersheba, and number ye the people, that I may know the (c) number of the people.
(c) Because he did this to determine his power and to trust in it, it offended God, for otherwise it was lawful to number the people, (Exodus 30:12; Numbers 1:2).
For the king said to Joab the captain of the host, which was with him,.... Or who was with him, even Joab, who was now at court, and was a counsellor of David, as well as his general; or which army was with Joab, a standing army he had the command of:
go now through all the tribes of Israel, from Daniel even to Beersheba; from the northern part of the land of Israel to the southern part of it, and this course was accordingly steered, 2-Samuel 24:6,
and number ye the people, that I may know the number of the people; so that this appears to be done not through any urgent necessity, but merely out of curiosity, and to gratify the pride of his heart, and please himself with the thought of ruling such a numerous people, and brag of their numbers to other nations, and place his confidence therein; and no wonder it was displeasing to the Lord.
David entrusted the task to his commander-in-chief Joab. אתּו אשׁר, "who was with him:" the meaning is, "when he was with him" (David). We are not warranted in attempting any emendations of the text, either by the expression אתּו אשׁר, or by the reading in the Chronicles, העם ועל־שׂרי ("and to the rulers of the people"); for whilst the latter reading may easily be seen to be a simplification founded upon 2-Samuel 24:4, it is impossible to show how אתּו אשׁר שׂר־החיל, which is supported by all the ancient versions (with the sole exception of the Arabic), could have originated in העם ואל־שׂרי. "Go now through all the tribes of Israel, from Daniel to Beersheba (see at Judges 20:1), and muster the people." פּקד, to muster or number, as in Numbers 1:44. The change from the singular שׁוּט to the plural פּקדוּ may be explained very simply, from the fact that, as a matter of course, Joab was not expected to take the census by himself, but with the help of several assistants.
*More commentary available at chapter level.