David inquired of Yahweh, “Shall I go up against the Philistines? Will you hand them over to me?” Yahweh said to David, “Go up, for I will surely hand the Philistines over to you.”
In context
17When the Philistines heard that David had been anointed king over Israel, they all came up in search of him, but David heard about it and went down to the stronghold. 18The Philistines arrived and spread out through the Valley of Rephaim. 19David inquired of Yahweh, “Shall I go up against the Philistines? Will you hand them over to me?” Yahweh said to David, “Go up, for I will surely hand the Philistines over to you.” 20David went to Baal-perazim and defeated them there. He said, “Yahweh has broken through my enemies before me like a bursting flood.” So that place was named Baal-perazim. 21The Philistines left their idols there, and David and his men carried them off.