His ban is longer than the 10-game suspensions handed to Luis Suarez for biting and Rotherham defender Kirk Broadfoot for misconduct.
Andrew, 29, was not punished on the field, but was later cited after a Football Association video review.
Rochdale won Saturday's League One derby match 1-0 at Spotland.
The usual tariff for violent conduct is three games, but that sanction was deemed insufficient by an independent disciplinary panel on Friday.
Dale will be without the former Crystal Palace striker, who admitted to his violent conduct charge, until January.
Former Manchester United and France forward Eric Cantona was banned for nine months for a 'kung-fu' style kick on a Crystal Palace fan in 1995.
Ex-Chelsea goalkeeper Mark Bosnich was given a suspension of the same length after testing positive for cocaine in 2003.
Rochdale striker Calvin Andrew has been given a 12-game ban - one of the longest in English football history - for elbowing Oldham's Peter Clarke.