Hi guys,is it possible to declare table variables as parametre's for SP ? I get:Server: Msg 156, Level 15, State 1, Procedure usp_test_tbvar, Line 1Incorrect syntax near the keyword 'table'.Server: Msg 137, Level 15, State 1, Procedure usp_test_tbvar, Line 6Must declare the variable '@tbvar'.Server: Msg 137, Level 15, State 1, Procedure usp_test_tbvar, Line 10Must declare the variable '@tbvar'.
trying create procedure usp_test_tbvar @tbvar table (e int,snm sysname, sip char(15), enab bit)as--declare @tbvar table (e int,snm sysname, sip char(15), enab bit)insert into @tbvar (e,snm,sip,enab)SELECT [entry], [server_nm], [server_ip], [enabled] FROM [RG_Scrap_Pad].[dbo].[server_ip_list]select * from @tbvar
although this works fine.declare @tbvar table (e int,snm sysname, sip char(15), enab bit)insert into @tbvar (e,snm,sip,enab)SELECT [entry], [server_nm], [server_ip], [enabled] FROM [RG_Scrap_Pad].[dbo].[server_ip_list]select * from @tbvar
I noticed from this topic:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=34283&SearchTerms=table+variablesthat Derrick noted we cannot exec sp's into @table variables. Can we use table variable's as paramter's, and output them ?TIA*##* *##* *##* *##* Chaos, Disorder and Panic ... my work is done here!