Error in stored procedure "incorrect syntax near"
Create next stored procedure
CREATE PROCEDURE dbo.SearchDebiors
(
@debName nvarchar(50)
@postNumb nvarchar(50)
@phoneNumb nvarchar(50)
)
AS
select * from Debitors where
[Name] like '%'+@debName+'%' and
cast(PostNumber as nvarchar(50)) like '%'+@postNumb+'%' and
(PhoneNumber like '%'+@phoneNumb+'%' or PhoneNumber is null)
RETURN
and cant save, every time error "incorrect syntax near @postNumb", must declare the scale variable @debName. Please help why?