Dan.
For complete MLB batting, pitching, fielding stats and more from
1871-2001, and better yet free if not for commercial use, then see
the Baseball Archive (http://www.baseball1.com). The data can be
downloaded in several formats including CSV files. This is just
a fantastic source.
If you're interested in finer grain data, then there's Retrosheet
(http://www.retrosheet.org) which has play-by-play event files
for each MLB game, mainly from 1974-1990. Each game's
play-by-play events are encoded using a textual scoring system.
These also can be freely downloaded as text files from this site.
Great for more detailed queries or even building a game
simulator.
This might be a bit off-topic for this group, but I'd be interested
in knowing more about the kind of analysis you're planning. I'm
a software developer and I do a lot of statistical analysis on
large-scale data sets in SQL, mainly financial data professionally
but have long had a desire to apply these ideas to baseball data.
Feel free to email me if you prefer.
Regards,
John