mcrmg
asked on
Passing fieldnames as parameter in stored procedure
Hi,
I have a sp like this
When I exec this sp
exec [st_test] "some string"
It does not return the value I need, instead, it returns number of rows in the table with "some string" as values. Any ideas? thanks
I have a sp like this
ALTER PROCEDURE [dbo].[st_test] @SelectString as varchar(8000)
as
select
@SelectString
from t1
ORDER BY userid
When I exec this sp
exec [st_test] "some string"
It does not return the value I need, instead, it returns number of rows in the table with "some string" as values. Any ideas? thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER