Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 pass #table to fn in stored P

Author  Topic 

Hommer
Aged Yak Warrior

808 Posts

Posted - 2007-06-20 : 14:21:57
Hi, every one,

Is it possible to pass a #table into a custom user function from within a stored procedure?

Hommer
Aged Yak Warrior

808 Posts

Posted - 2007-06-20 : 16:55:39
I guess it is impossible in SQL2000. SQL2005 or 2008 has table as data type.

I tried to DECLARE a memory structure inside my fn for the input #Table, SQL doesn't like that at all.

That leaves me with two other options: ##Table or a real table.
Or maybe another one, concat my #Table into a long CSV and pass that around.

All of them get ugly pretty quick.
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-06-20 : 17:13:26
Yes. Thats pretty much your options..

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-06-20 : 18:52:08
quote:
Originally posted by Hommer

I guess it is impossible in SQL2000. SQL2005 or 2008 has table as data type.



2005 doesn't have table valued parameters afaik. 2008 will, supposedly.


elsasoft.org
Go to Top of Page
   

- Advertisement -