calvinsinger
Programmer
Hi,
Can you please tell me if there is a way to pass a table variable to a function or Stored Proc..., when calling it from another stored procedure.
The problem I am facing is that I am calling a function
from within a stored procedure. And within this function which I am calling, I want to be able to do a select from a temporary table. This temp table is being created by the calling procedure. And SQL is not allowing me to access a temporary table from within the function.
I think I can solve this problem, if I use a table variable instead of a temporary table, within the function. But I do not know how to pass a table varible as an argument/parameter to the function being called. I do not know if it can be done at all.
Help appreciated. Thank you
Calvin
Can you please tell me if there is a way to pass a table variable to a function or Stored Proc..., when calling it from another stored procedure.
The problem I am facing is that I am calling a function
from within a stored procedure. And within this function which I am calling, I want to be able to do a select from a temporary table. This temp table is being created by the calling procedure. And SQL is not allowing me to access a temporary table from within the function.
I think I can solve this problem, if I use a table variable instead of a temporary table, within the function. But I do not know how to pass a table varible as an argument/parameter to the function being called. I do not know if it can be done at all.
Help appreciated. Thank you
Calvin