To look at the intermediate tables, remove the first character
# from the table names. This will make the tables non temporary, as SQL Server ha the convention that a table is temporary if its name starts with this character. You might also want to remove the
drop table statements from the code. Then you can just look into these intermediate tables like into any other table.
Of course, to be able to re-run the code, you would have to drop the tables manually.