He just hoped to get another chance.
"In the seventh I was out with the bases loaded, so I just put it in my mind that it doesn't matter what you do at one at-bat, more at-bats are coming," Tejada said calling the hit his favorite as an Astro. "When I [came] up in the ninth in that situation I just said: 'I've got to help my team here and try to be the guy.' "
Trailing 3-2 entering the ninth, Ivan Rodriguez led off with a single against Cardinals closer Ryan Franklin and scored when Chris Coste, subbing for the injured Lance Berkman, doubled on a long fly to center field that was just out of the reach of Colby Rasmus.
Tejada was mobbed by most of his teammates near the mound after his hit.
The victory pulled the Astros within a game of the Central-leading Cardinals after trailing by six games a month ago and nine on May 31.
"This is the closest we've been to the top since I've been here," Astros manager Cecil Cooper said. "It feels good."
Cardinals manager Tony La Russa was unhappy his team let this one get away.
"We thought we were going to get a really good win, but we ended up with a tough loss," he said.
Astros starter Roy Oswalt isn't surprised by the Astros turnaround. After all, he's seen it before.
"We've been doing this since I got here," he said. "The first half is played to keep close, the second half is to gain ground and maybe catch up and go ahead by the end."
The runs were the first allowed Franklin (2-1) in 18 innings. He allowed four hits.
"You know you are not going to be perfect," Franklin said. "You know you are going to struggle every once in a while. And when you do, you just can't go out there and get some work in, and it's OK if you give up a few runs. That's a problem. If you give up runs, you lose."
Houston closer Jose Valverde (1-2) pitched a scoreless ninth for the victory.
Berkman, who was out of the starting lineup with a calf strain, hitting for Oswalt, got a single to load the bases before Matsui's hit.
DeRosa's solo home run in the fifth inning put St. Louis ahead 1-0. It was his third home run since being traded from Cleveland after he hit a pair Tuesday.
"He is a tremendous player, and we were really excited to get him," La Russa said. "This is what he has done his whole career, get big hits. So keep him healthy and he'll really help us."
Carpenter allowed eight hits and struck out five before he was replaced by Franklin for the ninth.
Skip Schumaker doubled in the sixth before Rasmus reached on a fielder's choice where Schumaker was thrown out at third. La Russa didn't like the call and argued with the third base umpire for a bit before returning to the dugout.
The Astros got out of that inning when Albert Pujols grounded into a double play.
Oswalt allowed seven hits and three runs in seven innings after throwing a complete game in his previous start.
- St. Louis traded outfielder Chris Duncan to the Boston Red Sox on Wednesday for shortstop Julio Lugo and cash. Duncan has struggled since June 29, going 1 for 31 with no RBI.
- Astros RHP Chris Sampson, on the disabled list with muscle spasms, threw a bullpen session on Wednesday and Cooper said he was feeling good.