|
My stored procedure is like this
CREATE PROCEDURE GetCardByNumber
@CardNumber nvarchar(255)
AS
DECLARE @sql NVARCHAR(2000)
set @CardNumber ='''' + replace(@CardNumber,'.',''',''') +''''
SET @sql ='select * from CardTable where CardNumber in ('+ @CardNumber +')'
exec @sql
GO
When I run it, I get an error: Cannot find the stored procedure'select * from CardTable where CardNumber in ('226026275526')'.
Please help analyze the error. Thank you |
|