Are you sure about that?
copy and paste it to SSMS...that stops right away with a syntax check, since the EXEC command cannot exist inside the parameter list.
H4K (8/29/2012)
You don't have to use a SP. you can just replace following code:SELECT value from dbo.Fn_tsp_orderhistory(EXEC STORED_PROC_NAME
('''+@c+''')
WITH
SELECT value from dbo.Fn_tsp_orderhistory( '%' + REPLACE( @C, '*', '%') + '%')
Lowell