Prev: Questions and answers
Next: Partition, sum and....?
From: Plamen Ratchev on 12 Mar 2010 20:02 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
|
Pages: 1 Prev: Questions and answers Next: Partition, sum and....? |