Hi,
I wrote a SP to pass a value to SP. It works well
ALTER PROC [dbo].[getCompleteItems] (@p_ItemID varchar(32))
AS
DECLARE @IntVariable char(32);
DECLARE @SQLString NVARCHAR(500);
DECLARE @ParmDefinition NVARCHAR(500);
/* SQL String */
SET @SQLString =
N'select * from [dbo].[Complete_Items] where ITEM_ID = @p_ItemID';
/* Parameter Definition */
SET @ParmDefinition = N'@p_ItemID char(32)';
/* Parameter Value */
SET @IntVariable = @p_ItemID;
EXECUTE sp_executesql @SQLString, @ParmDefinition,
@p_ItemID = @IntVariable;
GO
The above SP works for only 1 item_id. How to pass several item_id's ???