declare @Table1 table (RegNo int, RegName varchar(10)) insert into @Table1 select 55,'James' union select 56,'Frank' Now i need to fetch records through Stored Procedure like following CREATE PROCEDURE [dbo].[Sp_FindNo] @RegNo int As Select RegName from Table1 where RegNo in (@RegNo) GO Now the problem is like if i do the following then an error displays EXEC Sp_FindNo '55,56' or EXEC Sp_FindNo 55,56
(comments are locked)
|
|
take a look at these link http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm http://www.sommarskog.se/arrays-in-sql-2005.html Thanks dear....its done.....great help.....
Feb 02 '10 at 03:11 AM
Deepak Ghosh
(comments are locked)
|
|
If you were using SQL 2008 you could pass a Table to a Stored Procedure
(comments are locked)
|

