You cannot use Stored Procedurewhere in the clause, but you can use where in the clause User Defined Function.
If you cannot convert SP to a function, you first need to get the bit value from the SP execution and use this variable in the where section ..
source
share