error in update

  • Hi,

    There is a table that have a field varchar(20), but when i update by in a store procedure, if the parameter is defined as varchar(20) and the value is e.g cat, the field is updated:

    cat with spaces until 20.

    'cat '

    Is any configuration in the server or the database?

    thanks...

  • Hello,

    Could you script out and post both the SP and the Table definitions?

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

  • Looks like there is a CHAR(20) instead of a VARCHAR(20) anywhere.

  • As suggested by Florian, there must be some variable (may be within sp), which is defined as CHAR datatype, where in the value in the variable is automatically padded with spaces.



    Pradeep Singh

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply