I have a SQL stored procedure of the form
SELECT [fields] FROM [table] WHERE @whereSql
I want to pass the procedure an argument (@whereSql)
Make sure you read this fully
www.sommarskog.se/dynamic_sql.html