Lack of B12 is very common in chronic Helicobacter infection.
Several infection specialists do not trust the Helicobacter tests, if people have any gastro symptoms that they not can find out of such doctors often treat empirically for helicobacter.
Unfortunately the doctors cannot agree on optimal treatment for helicobacter, for example in Europe 1 week triple therapy is often used; in USA 2 week quadruple therapy is quite common.
Most people think Helicobacter only can give stomach problems, but because it often lead to B12 deficiency even if you take supplements it can lead to a lot of medical problems in the rest of the body, B12 is necessary for your nerve systems and many other things.
After people are cured for Helicobacter they tend to have no problem with B12 deficiency even if not taking supplements, as long as eating healthy, but with infection B12 deficiency can be result even if you take a lot of oral B12, probably the helicobacter bacteria in some way makes it difficult for the body to take up the B12.
I am wondering if B12 deficiency also is common in other types of gastro infections.
If you have reasons to think you have B12 deficiency then ask to be tested for it, and also ask your doctor to seriously consider Helicobacter and or other infections that can lead to this problem.