CHICAGO (CBS / AP) — Pinch-hitter Aramis Ramirez singled to drive in the winning run with two outs in the bottom of the ninth and the Chicago Cubs beat San Francisco 2-1 on Wednesday night to end the Giants’ seven-game winning streak.

Sergio Romo (3-1) gave up an infield single to leadoff batter Tony Campana, who moved to second on Reed Johnson’s sacrifice. After a groundout moved him to third, Ramirez hit an 0-2 pitch to left to win it.

San Francisco’s Emmanuel Burris hit an RBI single in the top of the ninth off Chicago closer Carlos Marmol (2-2) to tie the game after starter Ryan Dempster had shut out the Giants on two hits for eight innings and retired 20 straight at one point.

Pinch-hitter Pat Burrell led off the ninth against Dempster with a double. Marmol relieved and struck out Andres Torres, but Burriss singled to center to score pinch-runner Bill Hall with Burriss taking second.

Pablo Sandoval was walked intentionally before Aubrey Huff blooped a ball to center that Campana couldn’t catch and fell for a single. Waiting to see if the ball would be caught, Burriss held and had to stop at third, loading the bases. Cody Ross then grounded into an inning-ending double play.

Marmol got the win despite his fifth blown save in 21 chances.

After Carlos Pena doubled, Blake DeWitt hit an RBI single to put the Cubs ahead in the seventh against San Francisco starter Tim Lincecum, who gave up five hits in seven innings.

Dempster gave up a double to Sandoval in the first and another to Nate Schierholtz in the second. He then kept the Giants off base until Burrell doubled.

Lincecum, the two-time Cy Young Award winner, walked two and struck out nine. Dempster threw only 83 pitches and had no walks with six strikeouts.

Notes: GM Jim Hendry says the Cubs won’t be holding a fire sale at the trading deadline despite the team’s dismal performance. Some of the team’s younger talent, he said, isn’t going anywhere. “Everybody thinks there is this automatic you have to be a buyer or a seller. … We’re certainly going to hold on to the people that we feel will be major contributors down the road.” Acknowledging how disappointed everyone in the organization is by the Cubs’ poor performance, Hendry vowed the team would not cash it in over the final three months. “We’re not going to roll over and we’re not going to pretend like it’s, ‘Oh poor us and wait until next year.’ We’re going to get after it and play good baseball the last 90 games.” … Game-time temperature was 65 and with a wind blowing in from right at 10 mph the ball didn’t carry. … The Giants were still undecided on their starting pitchers for Saturday and Sunday in interleague games at Detroit. Madison Bumgarner will start Friday. … The division-leading Giants finished the halfway point of the season 46-35. A year ago, when they went on to win the World Series, they were 41-40 and in fourth place in the NL West, 7 ½ games out of first.

(Copyright 2011 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)