Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Dynamic table names

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-18 : 17:32:43
Chris writes "Is it possible to have a parameter in a store procedure that is the table name and use the parameter in a insert or select statement. According to the online help you can not do it.

Example:
CREATE PROCEDURE A_TEST
@tablename varchar(20)

AS
select * from @tablename"
   

- Advertisement -