When you have a lot of co-workers being friendly with them all is not necessarily the best course of action. It can be nice to be on amiable terms with everyone, which is not the same as friendly, but the best I am usually hoping for is to not be on overtly hostile terms with anyone. Mostly I manage this, sometimes I don't. Friendliness, the people I might chat with briefly, is in a slightly smaller subsection of that generalized amiability, and those relationships need to be considered on an individual basis as they're developed. How much do I want to encourage a relationship with someone who almost exclusively complains to me about mundane, boring and bitter things from their personal life? Do I want someone who is relentlessly inept to feel free at all times to approach me for help? How much distance do I keep from someone who can be ever so slyly and secretly mean, but is mostly friendly? What about, for instance, a very quiet, not very good at their job sort of person? Will they be happier if I don't talk to them? Would they like a little inclusion? A little help? I don't know the answer to any of these things. I try and feel my way through. How co-workers affect me can make a difference too. A clerk who is really terrible at their job, and we currently are carrying several of these, can have a truly negative impact on my day and my work reality. That may not be personal to me what they're doing, but it is bound to affect my natural sense of warmth towards them. Why wouldn't it? But sometimes different kinds of responses are appropriate towards them depending on their character and just how bad they are. Sometimes being chatty and friendly with one gives me a free space to insist they do better, at least around me. They may only do slightly better, but it allows for my own self expression, at least in the face of their annoyingness, without risking some kind of pointless fight. For others there's nothing for it but one "Hello" every three days and perhaps an occasional vague smile.
As the circle of job difference widens I can be a little less affected by problem workers and their problem personalities. There is a librarian who I wouldn't wish on any patron in the world, er, no, wait, I mean, who I would only wish on a very tiny selection of very unpleasant patrons, but who works in a sphere usually far enough removed from me that I could comfortably say a couple friendly things to her the other day. And I was rewarded for it! That afternoon, walking past the reference desk to shelve, she twice shared internet tidbits with me. I was invited to a picture of a tree fallen on a car (interestingly, coincidentally, that night I would see that same sort of event played out all over my neighborhood!) and I also learned there, at her computer, that Kanye West's child would be called "North." Neither of these were immensely interesting, but it's nice to be included.