Hi Phil, thanks for your answer.
I stilll have one question:
-Can I avoid the use of Dynamic SQL using a stored procedure?
I have read about "Table-Valued Parameters" and stored procedures and I think I'm close to finish this puzzle but I can't see how can I parameterized the table name.
Kind Regards,