In the annals of television history, NBC's cancellation of "JAG" in the spring of 1996 won't go down as a particularly smart move.

Actually, you could file that one under W for "Whoops!" Or maybe D for just plain "Dumb."CBS jumped at the chance to pick up the show and had the patience to stick with it in the face of less-than-spectacular ratings. And it has paid off for the network, which has seen "JAG" turn into a bonafide hit on Tuesday nights.

It is, as CBS President Leslie Moonves termed it, a "real success story."

"Airing against a lot of high-profile comedies, 'JAG' has emerged as the time-period leader," Moonves crowed in a recent telephone interview.

By the end of last season, "JAG" was regularly beating "Mad About You" on NBC and had pulled about even with "Home Improvement" on ABC. This season, it's doing even better -- up 11 percent in households, 8 percent in adults 18-49 and 10 percent in adults 25-54.

"JAG" is now the No. 14 show in household ratings and has risen to No. 45 among the advertiser-friendly 18-49 demographic. (The show draws about 5 million young adult viewers to the TV every Tuesday at 7 p.m. -- just about the same number who tune in to see the oh-so-hot "Buffy the Vampire Slayer" over on the WB.)

In the ultimate turn-around, "JAG" now consistently beats both "Mad About You" and "Home Improvement."

And that's a big blow, particularly to NBC, which is paying Paul Reiser and Helen Hunt a million bucks an episode for this, "Mad's" final season. "JAG" -- the show that NBC canceled -- has done such a job on "Mad About You" that the sitcom has been sent scurrying off to Monday nights in an attempt to revive its ratings.

"Here's a little-known fact, which we found very interesting -- 'JAG' is watched by more people each week than 'X-Files,' 'Ally McBeal' or 'Law & Order,' " Moonves said.

It's not just that viewers have found "JAG" (an acronym for the U.S. Navy's judge advocate general) over the years that accounts for the show's success -- the show has also found itself.

It started off as sort of an empty-headed action series but has evolved into something a lot smarter, a lot funnier and a lot more watchable. It combines legal drama with action and a good dose of humor.

The cast, headed by the attractive duo of David James Elliott (as Lt. Commander Harmon "Harm" Rabb) and Catherine Bell (as Maj. Sarah "Mac" MacKenzie), has the proper chemistry. And the scripts manage to come up with a few surprises in what seem rather straightforward stories.

Success is the greatest revenge in television. And, these days, "JAG" is beating the heck out of NBC with a vengeance.

'RAYMOND' IS A HIT: CBS chieftan Moonves is preaching patience with his television series. And he's got another prime example in addition to "JAG" -- the Monday-night sitcom "Everybody Loves Raymond."

In its third season, it is now CBS's highest-rated Monday series and has risen to No. 14 for the season-to-date (tied with "JAG," of all things). And it comes as a bit of a surprise, given that the show was moved back a half hour to 8 p.m. in the fall, where it has to do battle not only with ABC's "Monday Night Football" but the Fox hit "Ally McBeal."

Which makes it all the more impressive that "Raymond" is up 5 percent in households, 23 percent in adults 18-49 and 15 percent in adults 25-54 from last season. It regularly beats "Ally" in the ratings.

"I think one of the keys to our success of this year has been the rebuilding of Monday night with only two returning shows and three new ones," Moonves said. "Obviously, 'Raymond' is the lynchpin."

OLDIES BUT GOODIES: CBS isn't immune to the problems plaguing network television -- overall, its ratings are down this season (although less than NBC's and ABC's).

Still, you can hardly blame Moonves for crowing a bit about a decision he made that turned out better than a lot of people expected.

"A couple of years ago, people doubted our strategy of signing Bill Cosby and Ted Danson," Moonves said. "We're very happy to report that Bill has two shows that are working and it appears that Ted has one."

Cosby, of course, has both "Cosby" on Monday nights and "Kids Say the Darndest Things" on Friday nights. His sitcom is first in its timeslot, and "Kids" is a strong second in its timeslot.

As for Danson, his new sitcom "Becker" is the No. 2 new comedy of the season (trailing only "Jesse," a timeslot-hit sandwiched between "Friends" and "Frasier" over on NBC). Since replacing "The Brian Benben Show" on Monday nights, "Becker" has improved that time period's ratings 43 percent in households and 46 percent in viewers 18-49.

It also forced another change at NBC, with the Peacock moving "Will & Grace" -- which had been beating CBS in the time period until "Becker" premiered -- off to Tuesdays.

Of course, Moonves can't be too smug about hiring Danson. Two years ago, he hired the former "Cheers" star for the sitcom "Ink," which limped along in the ratings for a season before being canceled.