how to call a stored procedure in where clause of SQL
sql, sql-server, sql-server-2005, sql-server-2008, t-sql
Solution
You can not use `Stored Procedure` in where clause but can use `User Defined Function` in where clause.
If you cant convert SP to function then you have to first get bit value from executing SP and use that variable in where clause..
Problem
I have a T-SQL script, requirment is I need to call a stored procedure in where clause. This stored procedure accept a parameter and returns a bit result. Kindly guide me how to do it. Thanks Edit: I cant modify this sp and make it a function. please