First of all, those pills have all kinds of additives that are impossible to digest. Most pills include all kinds of junk, including shellac(!) to help them slide out of the molds they are made in. Secondly, you need other minerals to help the Vitamin D, which in turn is there to help you absorb the calcium. You aren't getting those. So the stuff is sitting in your digestive system and causing gas. Most doctors have had ZERO nutritional training (although the good ones will at least admit it), so they just tell you take pills because that's what they read somewhere.
I've had great results with Reliv products because they are balanced, and the whole formula is considered. You cannot get your essential nutrients from food any longer, no matter how well you think you eat. The AMA came out in 2003 and said everyone must supplement - but they didn't investigate enough to tell you what to supplement with! My doctor is thrilled with my Reliv results and told me it's great stuff, to continue, etc. They have US govt patents so are safe and unique and effective. Instead of trying to mix and match with stuff off the vitamin aisle shelves, I recognized that I am not a PhD food scientist and I'm not qualified to play amateur chemist - so I take something synergistic and balanced that was developed by scientists who DO have that training. Because of the balance, you can't "overdose" or "megadose". It's also in liquid form which is highly absorbable, so it's the most economical nutrition you can buy.
If you want to read a piece from the Physicians Desk Reference on the problem with absorption of pills, give me your email address and I will send it to you. The problem with undigested pills of all sorts is well known - there were huge reports in the papers about 2 years ago, after a major Associated Press investigation of water supplies in many major US cities. We're wasting our money on pills, not getting results, and having huge problems with that stuff stuck in our digestive tracts.