Well no. It won't exit, will it?
There is little point in you doing this:
select @i=@i-1
At the bottom of your loop if right at the top you do this:
select top 1 @id=id from Biometrics where Userid=@Userid and [Date]=@Yesterday order by id desc
and you don't change any of the details in the WHILE clause! If it works once, it will set the same value each and every time!