- Jul 3, 2001
- 10,784
- 6
- 81
I want to pass in a string to a stored procedure, and I want to use that actual string's value in the procedure.
ex. the string is a SQL statement that I want the procedure to insert into a temptable, so I can page through the records.
INSERT INTO #TempItems (title, description)
SELECT title, description FROM datatable
I want to pass in the "SELECT title, description FROM datatable" as a variable and have in the stored procedure instead
INSERT INTO #TempItems (title, description)
@sql
Can I do this some how?
ex. the string is a SQL statement that I want the procedure to insert into a temptable, so I can page through the records.
INSERT INTO #TempItems (title, description)
SELECT title, description FROM datatable
I want to pass in the "SELECT title, description FROM datatable" as a variable and have in the stored procedure instead
INSERT INTO #TempItems (title, description)
@sql
Can I do this some how?
