Hi All,
I'm trying to create a search stored procedure within MSSQL.
I've come up with the following:
I've tested this a few times on the test data I have in the database but it does not seem to be working correctly, although when I manually put something in, ie - take the parameter out and type in for example: WHERE FirstName LIKE '%at%' it will work...
Can anyone explain to me what I am doing incorrectly?
I'm trying to create a search stored procedure within MSSQL.
I've come up with the following:
Code:
ALTER PROCEDURE [dbo].[usp_Search] @SearchText nchar(15) AS BEGIN SELECT * FROM dbo.Person WHERE FirstName LIKE '%'+@SearchText+'%' END
Can anyone explain to me what I am doing incorrectly?
Comment