2 Samuel 12:22
And he said, While the child was yet alive, I fasted and wept: for I said, Who can tell whether God will be gracious to me, that the child may live?
Cross-reference
2 Samuel 12:16 describes David's fasting and pleading – the actions that accompany the hope expressed in 12:22.
Joel 2:14 uses the exact phrase 'who knows whether he will turn and relent' — directly echoing David's expression of uncertain hope.
Amos 5:15 similarly says 'it may be that the LORD will be gracious' — a parallel appeal for mercy contingent on repentance.
In Jonah 1:6, the captain uses the same 'perhaps' logic – hoping God will spare them – mirroring David's hope for his child.
Jonah 3:9 echoes David's exact 'who knows' phrasing, expressing the same hope that God may relent after repentance.
Jonah 3:10 shows God relenting in response to repentance – the outcome David hoped for but did not receive.
Zephaniah 2:3 urges seeking humility with 'perhaps' you'll be sheltered – the same uncertain hope David expresses.
2 Kings 20:3 shows Hezekiah appealing to his own righteousness, contrasting with David's humble hope in God's mercy.
Isaiah 38:3 parallels Hezekiah's prayer of self-righteousness, contrasting with David's appeal to God's grace.
Isaiah 38:5 records God's gracious response to Hezekiah's tears — a contrasting outcome to David's unanswered plea.