My question is why couldn't you rewrite the example in the article as the following:
IF @Last <> '' AND @First = ''
BEGIN
SELECT * FROM authors WHERE au_lname LIKE @Last + '%'
END
ELSE IF @First <> '' AND @Last = ''
BEGIN
SELECT * FROM authors WHERE au_fname LIKE @First + '%'
END
ELSE
BEGIN
SELECT * FROM authors WHERE au_lname LIKE @Last + '%' AND au_fname LIKE @First + '%'
END
What is the advantage here of having 3 separate stored procedures? Forgive my ignorance.