mote.ajit2 (12/4/2013)
Hi!I am trying to call procedure from function but getting following error.
Invalid use of side-effecting or time-dependent operator in 'INSERT EXEC' within a function.
Actually I want table valued function so that I can use it in outer apply to process every left input.
and in that function I am calling another already available procedure.
may be this is not valid here but another alternative I can see is use of cursor which I have to prevent because of possible slowness of query.
Can anybody suggest some workaround?
you'll most likely have to change your function into a procedure instead. functions have a number of rules that have to be followed; dynamic SQL is one of the items not allowed, as well as others. if you show us your function or better explain what you are trying to do, we can help better.
Lowell