I have a stored procedure that I need to be able to change the table name that the select statement in the stored procedure uses depending on a user input, however I am having a problem with the code:
@projTable is passed from a form in my application
Thanks in advance
Simon
VB.NET:
CREATE PROCEDURE [dbo].[spQryParentComments] @projTable as varchar(50)
AS
SELECT FROM @newProjTable WHERE (commCommited = '1' or commCommited = '2')
GO
@projTable is passed from a form in my application
Thanks in advance
Simon