Super basic stuff here but i just can't seem to stop the loop repeating to infinity. I started by grabbing count values and storing them to the variable but when that didn't work i wanted to strip it back to the basics by just declaring the numbers to test them.
I've followed basic examples online and there doesn't seem to be anything extra in them that i don't have so apologies if this is level 0 stuff.
(I would expect the result of the select statement to be showing 11 times but it just goes on forever)
Declare @bid_loop int = 0
Declare @maxcount2 int = 10
While (@bid_loop <= @maxcount2)
BEGIN
select * from @BranchIDList
END