This question already has an answer here:
Is there a general trend or rule of when to use
in when you are mentioning a place?
For instance this sentence:
Der Zug hält am Krankenhaus. The train stops at the hospital. I thought
bei was a more appropriate in this case.
Der Zug hält beim Krankenhaus. The reason why I thought
bei was more appropriate is because usually when first started to learn
bei it is associated with buildings and such and
an with smaller objects. But I've come across lots of sentences that seem to use them interchangeably.
in am I correct in thinking that you use it when you want to express intent of entering a building or an object?