I have data list like below.
'TED00000,TED00001,TED00002,TED00003'
i want to execute through query sql to filter the data, so the identity of the data is shown like below:
=============================
NO | Identity | Description |
-----------------------------
1 | TED00000 | Book |
-----------------------------
2 | TED00001 | Bag |
-----------------------------
3 | TED00002 | Eraser |
-----------------------------
4 | TED00003 | Pencil |
=============================
and i use this Stored Procedure like below :
USE [NewInSys]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[AdvanceSearch]
@sIdentity VARCHAR(MAX)=NULL, @sDatabaseId VARCHAR(MAX)=NULL
AS
SELECT Identity From table Where Identity=@sIdentity AND DatabaseID = @sDatabaseId
then, i try to execute Stored Procedure like below :
exec spAdvanceSearch @sTerminalID=N'TED00000,TED00001,TED00002,TED00003'@sDatabaseID=N'101'
but i didn't get the result as i want.
is there any trouble with this step in the execution of stored procedure?