Wiktionary
n. A long-winded tale or yarn featuring extensive narration of typically irrelevant details, usually resulting in a pointless or absurd punchline, which is often a pun or spoonerism on a known catchphrase.
WordNet
n. a long rambling joke whose humor derives from its pointlessness
Wikipedia
In its original sense, a shaggy dog story is an extremely long-winded anecdote characterized by extensive narration of typically irrelevant incidents and terminated by an anticlimax or a pointless punchline.
Shaggy dog stories play upon the audience's preconceptions of joke-telling. The audience listens to the story with certain expectations, which are either simply not met or met in some entirely unexpected manner. A lengthy shaggy dog story derives its humour from the fact that the joke-teller held the attention of the listeners for a long time (such jokes can take five minutes or more to tell) for no reason at all, as the end resolution is essentially meaningless.
Shaggy Dog Story is a charity programme for Children in Need, put together by the BBC in 1999 as a sequel to the previous year's Future Generations video (featuring children's programmes), and the great success of 1997's " Perfect Day" charity single. It was first shown on 27 December 1999.
Shaggy Dog Story was dedicated to the BBC's comedy output. It featured various comedians and comic actors (some in character, others as themselves) telling a long-winded shaggy dog story, beginning off with Ronnie Corbett in his trademark armchair, who is most famously known for telling such stories on The Two Ronnies. The story featured a cricket captain who hired a horse for his team, who ends up as a good player but can't run.
A second, shorter story, entitled "Mammals vs. Insects", was also broadcast on 4 January 2000. This story revolved around a football match between the two teams of creatures and featured many of the participants from the other story.