Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can we pass a tablename as Parameter to Stored proc.
Message
From
21/03/2005 03:54:53
Raoshan Kumar
Softinfo Systems Pvt. Ltd.
New Delhi, India
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Can we pass a tablename as Parameter to Stored proc.
Miscellaneous
Thread ID:
00997760
Message ID:
00997760
Views:
38
Hi All,

How can we pass a tablename as parameter to Stored Procedure. For example If I want to create an SP in the following way:
CREATE PROCEDURE myproc
    @cTablename varchar(40)
AS
SELECT * FROM @cTableName
the above code does not work. Is any other way to do the same.
Pl. help me out


Thanks

Raoshan
Next
Reply
Map
View

Click here to load this message in the networking platform