|
CREATE PROCEDURE Test
@idString NVARCHAR (1000)
AS
DECLARE @sql NVARCHAR (2000)
--If the card number is a string
set @idString = '' '' + replace (@idString, ',', '' ',' '') + '' ''
SET @sql = 'select * from Users where card number in (' + @idString + ')'
exec @sql |
|