Stored procedure returns nothing
It shouldn't be a problem to find, but after long hours of work I can't seem to notice what I am doing wrong here.
There is a very simple stored procedure:
ALTER PROCEDURE MyProc
@input char(10)
AS
BEGIN
SET NOCOUNT ON;
SELECT isonum
FROM iso where isonum LIKE '%' + @input + '%'
ORDER BY isonum
END
when executing query: select isonum from iso where isonum like '%2333%'
- I get data, but when executing stored procedure:
exec MyProc '2333'
- I get nothing ???
What's wrong here?
0
source to share
2 answers