I have the 2009 mlb schedules availble to download on my site http://www.fan-exchange.com/mlb/schedule.asp Fields include homefranchid, awayfranchid and...
I just thought it would be cool if we all shared how we utilize the data we download. I started the website www.fan-exchange.com so fans can post their...
This post is only for those who sees this from a clinical rather than moral perspective. Please ignore this post is you are in the latter group. Can someone...
Tangotiger
tom@...
Apr 16, 2009 3:05 pm
3745
Craig Depken and Jon Ford have a paper in the 2006 Journal of Socio Economics looking at the impact of race on allstar ballots. I can provide the data we used...
Tom, I someone else was looking to do this and was using some kind of program to looked at the player's pitcher and then set the race accordingly. I look for...
When a player plays for multiple teams in the same year, each season is listed, plus a sum of all which is noted with team titled TOT (for total) at Baseball...
Is anyone using openoffice with the Lahman database? I am having issues when I try to make a query with the 2B and 3B data, getting errors that I do not...
The problem is likely that the query doesn't like a field name beginning with a number. I'm not certain what the syntax with OpenOffice is, but try something...
I did just find some help documentation. It appears that a double-quote is what you want to use. Vive la difference... select * from batting where "3B" like...
Could you point out a couple of the places where this occurs? sean 2009/5/1 htlfkbz <judsongreen@...> ... -- Sean Forman President, Sports Reference LLC ...
Most programming languages and DB don't like column/field names that start with digits. Instead of 2B, 3B, rename them to B2, B3. Alternatively, if you give...
Tangotiger
tom@...
May 4, 2009 10:42 am
3756
Is there a MySQL equivalent to this query? I'm struggling with converting it from Access to Mysql....
Can you show us what functions you've tried? Here's a related one in Oracle I've used (for something else): substr(min(to_char(order_id + 90000,'00000') || ...
Tangotiger
tom@...
May 8, 2009 8:58 pm
3758
I just figured it out: SELECT f2.yearid, f2.playerid, MID(MAX(CONCAT(1000 + CAST(f2.GP as CHAR(3)),"_",f2.pos)),6) AS PrimPos, Max(f2.GP) AS GP_Pos, SUM(f2.GP)...
The query that is described is a neat trick and a good concept to know, but it's not a great permanent solution. ACCESS: SELECT yearID, teamID, Pos,...
I'm surprised it works as you've laid it out (which is not to say that it's wrong, since I presume you've tested it). The reason I put "1000 + GP", is so that...
Tangotiger
tom@...
May 11, 2009 2:50 pm
3761
Bryan, You don't have a tie-breaker in case someone plays the same number of games at two positions, do you? I would suggest that any alternative solutions be...
Tangotiger
tom@...
May 11, 2009 3:19 pm
3762
I used CHAR(3) because the G column in the fielding table is smallint(3) in MySQL. I learned that I can actually change it to CAST(g as CHAR) and get the same...
What happens if you change: MAX(CONCAT(1000 + CAST(g as CHAR),"_",pos)) AS PrimPos To: MAX(CONCAT(CAST(g as CHAR),"_",pos)) AS PrimPos Tom ... The...
Tangotiger
tom@...
May 11, 2009 8:53 pm
3764
These are the results if I use MAX(CONCAT(CAST(g as CHAR),"_",pos)) AS PrimPos yearid,playerid,PrimPos 1914,ruthba01,4_P 1915,ruthba01,32_P 1916,ruthba01,44_P ...
Ah-ha, so CHAR does not use any particular property. If you do this: CAST(g as CHAR(3) Then do you get the desired results? Tom ... The Book--Playing The...
Tangotiger
tom@...
May 13, 2009 10:48 am
3766
No, I get the same results as before. CAST() seems to behave the same way Str() does for Access. From dev.mysql.com: The CAST() function takes a value of one...
Great, thanks. Ok, so the cleanest, correct method would be to do: CAST(1000+g as CHAR) Tom ... The Book--Playing The Percentages In Baseball ...
Tangotiger
tom@...
May 14, 2009 11:25 am
3768
If you just want an arbitrary winner, it's very easy to do it in the fashion that the hack does (which is just choosing the player with the highest ID, ...
Does anyone have a dataset of Negro League players and the team they were on? Other information is not needed as long as I have those two facts. I am mainly...
Jeff: Â Do you mean what MAJOR LEAGUE teams they were on, or what Negro League teams they were on? Â If you mean major leagues, there should be a file in the...