From: Plamen Ratchev on
Andrew wrote:

> ALTER PROCEDURE [dbo].[UpdateInvitation]
> -- Add the parameters for the stored procedure here
> @SentToUserId INT
> ,@SentToEmail VARCHAR(50)
> ,@SentByUserName VARCHAR
> ,@SentByEmail VARCHAR
> ,@SentDateTime SMALLDATETIME
> ,@ViewRate SMALLINT
> ,@CategoryName VARCHAR

When you declare VARCHAR parameters and you do not specify length it defaults to 1. That way you parameter value for
@SentByEmail 'test(a)af.com' becomes only 't' (similar for the other parameters without length) and the WHERE predicate of
the query fails to match. It is a best practice to always declare length for string data types.

--
Plamen Ratchev
http://www.SQLStudio.com