Sherlock Holmes never smoked a Meerschaum pipe, only Brier and only when considering a problem. His usual smokes were cigarettes. Also, Holmes said: "Elementary" only one time in all the books and short stories. The Meerschaum pipe and multiple "Elementary(s)" were the product of stage productions and Hollywood. However, at no time is it stated, or even implied, that Data only researched Sherlock Holmes by the written stories. Data obviously took his characterization from multiple sources.
The goof item below may give away important plot points.
When Yar informs Cap. Picard that one group of delegates has apparently committed murder, Picard rather flippantly passes off responsibility to Com. Riker. Cap. Picard is clearly tired and does not want to deal with the situation, but it is completely out of character for him to so nonchalantly disengage himself from such an important matter, especially since the lack of proper security on his ship has apparently resulted in what could be a diplomatic disaster.