See
Re: Tablenames as variables? Thread #
1005583 Message #
1005587>
>I have a question.
>
>If I have something like this.
>
>CREATE PROCEDURE dbo.prueba151106
>@base varchar(20)
>AS
>select * from [CPSI-SERVER].[@base].[dbo].[certificados]
>GO
>
>SQL say " The name of the objet '@base.dbo.certificados' is no valid. "
>
>How can I do to that the store procedure can recive the name of the database
--sb--