Dear John
i try only to look in the table @dbname
without the variable @Searchname its working perfect
i got all the data from this table
DECLARE @sqlCommand varchar(max)
SET @sqlCommand = 'SELECT * from '+ @dbname
EXEC (@sqlCommand)
Ken er nog niet veel van, maar leer het wel
Do not know much about it yet, but learn