
October 29th, 2012, 09:10 PM
|
|
Contributing User
|
|
Join Date: Oct 2012
Posts: 31
Time spent in forums: 4 h 42 sec
Reputation Power: 1
|
|
|
TSQL = query
I think this is a much easier question
and i have seen this done by other programmers, but i have forgotten how to do it.
Can someone teach me how to create a stored procedure, with parameters which would look like this.
CREATE PROCEDURE dbo.TestProc
(
@selectstatement varchar(50) = NULL,
@whereclause varchar(50) = NULL,
@orderby varchar(50) = NULL
)
AS
tsql = '@selectstatement + @whereclause + @orderby'
is this even possible?
thanks for any ideas
|