Couldn't resist this on Ebay recently. This scene never took place on either Barney Miller or Welcome Back Kotter, but it sure could have. Kotter was set in Brooklyn, and Barney Miller's 12th precinct was somewhere in New York, so it's entirely possible they could've busted the Sweathogs at one time or another.
The truth is, they just ran back to back on the same night, but I loved it when shows crossed over like this. Remember when there was a blackout on every NBC Thursday night show set in New York? I believe it was Friends, The Single Guy, Seinfeld, and Carolyn in the City. Or even further back, when Loni Anderson took the Love Boat to Fantasy Island? (Well, not exactly, but almost). It can get a little complicated: Kramer on Seinfeld sublet his apartment from Paul Reiser on Mad About you. Ursula, the waitress on Mad About You, was twin sisters with Phoebe on Friends. (I recently heard the part of Phoebe was adapted to make her the twin of Kudrow's part on the other show). Paul Reiser's character on Mad About you did a documentary on Alan Brady, the star of the show Rob Petrie wrote for back on The Dick Van Dyke. Morey Amsterdam's character from Dick Van Dyke, Buddy, once appeared on the Danny Thomas Show. Now, the Williams family on The Danny Thomas show once shared a home with the Ricardo family on the Lucy-Desi Comedy hour, which featured the same characters as I Love Lucy, on which little Ricky was once visited by Superman - the real, super-powered Superman from The Adventures of Superman, played by George Reeves. So....Seinfeld lives in the same world as Superman, and every character in between. (Which would've made Jerry's day, he was a big fan of Superman on the show...)
Don't think I'm such a big TV fan I know all this off the top of my head. Out there in the interweb, there's a site where they kept track of all the crossovers ever done on TV
here. Between the
grid here, mapping how the shows connect, and the key
here, it's easy to spend hours seeing how almost every show you watched growing up is connected. And, if you believe the last episode of St. Elsewhere, they're all an autistic boy's imaginings within a snowglobe.
Sadly, neither Welcome Back, Kotter or Barney Miller appear anywhere on this grid - but at least this photo proves their worlds did intersect, somewhere out there in the multiverse, briefly.