There was no episode of *The Sopranos* where David, the son of Dr. Jennifer Melfi, appeared.
It's possible you're thinking of a different character or show, as David was not a recurring character in the series. He was only mentioned a few times, with Jennifer talking about him and how his upbringing was influencing her work with Tony.