|
Posted by Erland Sommarskog on 07/25/07 21:23
ArunDhaJ (arundhaj@gmail.com) writes:
> Is it possible to pass a table as a parameter to a funtion.
It should be in SQL 2008, which currently is in beta. The functionality
is available in the current CTP, but I have not played with it, so I
can't say for sure that it works with functions.
> my problem is: i have to access a temporary table created in an SP in
> a function
>
>
> ALTER PROCEDURE MySP
> BEGIN
> ....
> DECLARE @TmpTable TABLE(...)
> ....
> TempFunction(@TmpTable)
> ....
> END
You probably need to rewrite the function as a procedure. See here for
some tips of passing data between stored procedures in current SQL versions.
http://www.sommarskog.se/share_data.html
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|