Exodus 17:5-6

17:5 The Lord said to Moses, “Go over before the people; take with you some of the elders of Israel and take in your hand your staff with which you struck the Nile and go. 17:6 I will be standing before you there on the rock in Horeb, and you will strike the rock, and water will come out of it so that the people may drink.” And Moses did so in plain view of the elders of Israel.

Exodus 17:9-12

17:9 So Moses said to Joshua, “Choose some of our men and go out, fight against Amalek. Tomorrow I will stand on top of the hill with the staff of God in my hand.”

17:10 So Joshua fought against Amalek just as Moses had instructed him;and Moses and Aaron and Hur went up to the top of the hill. 17:11 Whenever Moses would raise his hands, then Israel prevailed, but whenever he would rest his hands, then Amalek prevailed. 17:12 When the hands of Moses became heavy, they took a stone and put it under him, and Aaron and Hur held up his hands, one on one side and one on the other, and so his hands were steady until the sun went down.

Numbers 20:8-12

20:8 “Take the staff and assemble the community, you and Aaron your brother, and then speak to the rock before their eyes. It will pour forth its water, and you will bring water out of the rock for them, and so you will give the community and their beasts water to drink.”

20:9 So Moses took the staff from before the Lord, just as he commanded him. 20:10 Then Moses and Aaron gathered the community together in front of the rock, and he said to them, “Listen, you rebels, must we bring water out of this rock for you?” 20:11 Then Moses raised his hand, and struck the rock twice with his staff. And water came out abundantly. So the community drank, and their beasts drank too.

The Lord’s Judgment

20:12 Then the Lord spoke to Moses and Aaron, “Because you did not trust me enough to show me as holy before the Israelites, therefore you will not bring this community into the land I have given them.”