Thanks to both Posters.
Out of curiosity -- what does this line "WHERE st.objectid IS NULL" do?
I notice when this line is in the query no database name is returned but when this line is not in the Query or changed to IS NOT NULL I see the database name from DB_NAME(st.dbid) AS DatabaseName
thanks