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
 Transact-SQL (2000)
 Table as a Data Type

Author  Topic 

real_pearl
Posting Yak Master

106 Posts

Posted - 2004-07-01 : 02:25:31
Can we pass table to a stored procedure as input parameter?

Kristen
Test

22859 Posts

Posted - 2004-07-01 : 06:22:16
Do you mean a table variable?
From BOL:
quote:
Stored Procedure : Parameter : data_type

Is the parameter data type. All data types, except the table data type, can be used as a parameter for a stored procedure. However, the cursor data type can be used only on OUTPUT parameters. When you specify a data type of cursor, the VARYING and OUTPUT keywords must also be specified. For more information about SQL Server - supplied data types and their syntax, see Data Types.


What problem are you trying to solve?

Kristen
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-01 : 23:42:25
You can, but you'd have to use dynamic SQL. Do what Kristen said and explain whatever you're trying to do.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -