• Good catch, thank you.

    It turns out that @table was empty because I used a database where the sys.master_files table was empty; therefore, no rows for the cte...

    Live and learn

    🙂