I have both Costco and Sam's. I have had my Sam's membership for about 20 years - there's a really convenient freestanding one just a few miles away. I used to have a Costco card free through work, but my employer discontinued it last spring. I recently rejoined with the Living Social deal, and it was just in time for us to get new cell phones there. So between the free stuff with the deal and the rebates on our cell phones, our membership fee paid for itself and then some.
Even with the new Costco membership in hand, I still find myself shopping more at Sam's. Location is more convenient, as our local Costco is in a shopping center that was "reimagined" from an old mall. The parking lot has got to be the worst design possible. It's like driving in a maze and it deters me. But that aside, I think I'm just used to certain items I buy at Sam's.
As an example, the Clif Bars at Costco slightly less expensive, but at Sam's I get Chocolate Chip, Peanut Butter and White Chocolate Macadamia Bars in a multi-pack. At Costco, you only get the first 2 varieties. Refrigerated shredded parmesan at Sam's is less money for more cheese. Granted, Costco only has parmagiano-reggiano, but I don't need that premium quality. I hate the milk bottles at Costco, too. I know it takes up less space for shipping, but my kids spill it every time they pour. Did not care for their selection of deli meats either.
When I have both memberships, I tend to buy more staples at Sam's. Then I might occasionally drive to Costco and enjoy food samples, and just walk around and browse. I tend to leave there with things I don't really need but found good deals on. Like wine. Or a hanging flower basket for my porch. I also recently bought Scallops there - then realized they were MUCH cheaper at Sam's (like more than $10 cheaper for 2.5 pounds.)
Finally, Sam's Club recently switched from offering a Discover card to Master Card. It offers 5% back on gas purchases of up to $6000 a year. And that's on gas purchased ANYWHERE, not just their station. Also 3% on restaurants and travel. I used to use their card only for purchases there and at Wal-mart, but now I've been using it for gas and restaurants too.
I imagine I will let the Costco membership lapse again after the 1st year - just can't justify paying for both of them.