It was a case of goodbye and hello for television’s top dramas Thursday, as the farewell episode of Anthony Edwards’ character on “ER” and the introduction of spinoff characters on “CSI” delivered scorching ratings.

According to Nielsen, an episode of NBC’s “ER” devoted entirely to Edwards’ departing Dr. Mark Greene posted the best scores for any program (28.71 million, 13.9/34 in A18-49) since the Academy Awards on ABC in late March.

An hour earlier, CBS’ “CSI: Crime Scene Investigation” attracted its second best numbers to date (27.12m, 9.6/23) with an episode that introduced the characters portrayed by David Caruso and Emily Procter from this fall’s spinoff “CSI: Miami.”

NBC, the May sweeps leader, captured both Thursday and Friday in adults 18-49 and total viewers. Fox took Saturday in the demo, and CBS in overall aud.

Elsewhere Thursday, CBS’ “Survivor” gained ground on NBC’s “Friends,” which was flat week to week with a still-dominant 11.7/33 in 18-49 and 24.32 million viewers overall. “Survivor” grabbed its best numbers in a month (20.83m, 8.1/22 in 18-49), taking its second half-hour in viewers and most male demos.

NBC’s “Will & Grace” (18.13m, 9.2/22 in A18-49) had a strong showing with an episode in which the title characters decide to have a baby, but it still came up a tick short to “CSI” in 18-49, while falling well behind the crime drama in overall audience.

A repeat of “Star Wars: The Phantom Menace” (8.16m, 3.7/9) gave Fox its strongest Thursday in the demo with entertainment programming since an airing of “Home Alone 2” in December 2000, but ABC stumbled for the second time in five days with “Stuart Little” (4.77m, 1.4/3).

On Friday, NBC won in adults 18-49 for the 31st time in 33 weeks this season and in total viewers for the 32nd time. Net was again led by 10 o’clock’s “Law & Order: SVU” (prelim 17.2m, 6.1/18 in A18-49), which matched its series high in 18-49 and remains the only series this season to win every week in the demo.

“SVU” had a strong lead-in from a special firstrun seg of “Law & Order: Criminal Intent,” which also won its hour (prelim 12.5m, 3.8/12). CBS’ repeat of “CSI” won at 8 (prelim 10.3m, 3.1/12), while NBC’s season finale of “Providence” (prelim 10.0m, 2.8/11) won most of the femme demos.

CBS, second in adults 25-54 on Friday, also saw a strong delivery for a pair of “Everybody Loves Raymond” repeats from 9 to 10 (prelim 2.9/9 in A18-49).

ABC, second in viewers Friday, was led by a Mother’s Day edition of “20/20” (prelim 10.2m, 3.5/10), which featured Barbara Walters’ interviews with Diana Ross, Whoopi Goldberg and Sharon Osbourne. It grabbed the newsmag’s second best scores of the season in key female demos.

Fox was a bust Friday with its two-hour “Girl Next Door: The Search for a Playboy Centerfold” (a fourth-place 2.4/8 in 18-49), but rebounded Saturday by taking the night easily in adults 18-49 (prelim 3.1/11), 18-34 and 25-54.

CBS won Saturday in total viewers and was second in adults 25-54, boosted by a “World’s Best Commercials” spec at 9 (prelim 7.3m, 2.0/7 in 18-49).