S7E11: Not All Dogs Go to Heaven
which is ridiculous because he knew he watched him die on the Enterprise B in Star Trek: Generations.
There's a perfectly simple explanation.
He was caught in a transporter pattern buffer for 75 years and Riker mentioned a 0.003% signal degradation,
which would account for Scotty's memory loss.