“… and at that time your people, everyone who is found written in the book, will be rescued. Many of those who sleep in the dust of the ground will awake, these to everlasting life, but the others to disgrace and everlasting contempt.” (Daniel 12:1b-2)
This passage corresponds to the following passage in Revelation 20:
“Then I saw a great white throne and Him who sat upon it, from whose presence earth and heaven fled away, and no place was found for them. And I saw the dead, the great and the small, standing before the throne, and books were opened; and another book was opened, which is the book of life; and the dead were judged from the things which were written in the books, according to their deeds...