bboggessswcg
Programmer
Can anyone tell me how to use the LIKE command in a stored procedure? Below is my current stored procedure. I keep getting a syntax error. I need to use the like and %. Thanks in advance.
CREATE PROCEDURE myGetAllAttorneysSearch (@strCounty char(2), @strSearch char(20))
AS
SELECT ATTYMF.ATALPH
FROM ATTYMF
WHERE (ATTYMF.ATCTY = @strCounty AND (ATTYMF.ATALPH Like @strSearch %)
ORDER BY ATTYMF.ATALPH
GO
CREATE PROCEDURE myGetAllAttorneysSearch (@strCounty char(2), @strSearch char(20))
AS
SELECT ATTYMF.ATALPH
FROM ATTYMF
WHERE (ATTYMF.ATCTY = @strCounty AND (ATTYMF.ATALPH Like @strSearch %)
ORDER BY ATTYMF.ATALPH
GO