the error is here:
SET @statement = 'INSERT INTO @temporaryTable SELECT taxText FROM ' + @taxonomy_table -- statement that will import the taxonomy in the temporary table
EXEC sp_executesql @statement
change it to
set @statement = 'select taxText from ' + @taxonomy_table
insert into @temporaryTable
exec sp_executesql @statement
The error is happening because in the scope of executing @statement
there's no variable table @temporaryTable
.