English Grammar question

Ok, my question: Are there any rules for when not to and when to use "that" and "which"?

For example: "This is the record I bought yesterday, which/that (?) I told you about."
 
From reference.dictionary.com (probably the 3rd most used site by me, other than this forum and Google):

Usage Note: The relative pronoun which is sometimes used to refer to an entire sentence or clause, rather than a noun or noun phrase, as in She ignored him, which proved to be unwise. They swept the council elections, which could never have happened under the old rules. While these examples are unexceptionable, using which in this way sometimes produces an ambiguous sentence. Thus It emerged that Edna made the complaint, which surprised everybody leaves unclear whether it was surprising that a complaint was made or that Edna made it. The ambiguity can be avoided with paraphrases such as It emerged that the complaint was made by Edna, a revelation that surprised everybody. ·Which may be used to refer to an entire sentence or clause only when it is preceded by that sentence or clause. When the referent follows, what should be used, particularly in formal style: Still, he has not said he will withdraw, which is more surprising but Still, what (not which) is more surprising, he has not said he will withdraw. See Usage Note at that. See Usage Note at what. See Usage Note at whose.

The only other language I know (or used to anyhow, I'm pretty rusty now) is Spanish. Hoo boy does it just plain make sense, and learning it made me realize just how fucked up English is.