Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    2

    Unanswered: trailing blank spaces

    I insert data into a column of VARCHAR and size 50 of SQL Server database. But the data inserted is of length 15. When it is inserted , it is done with trailing blank spaces padded till the length is 50.

    Any help ?

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: trailing blank spaces

    The nature of varchar is whats getting you. If you want the column to be a 50 character length you need to use char instead of varchar. Varchar automatcaly strips the padded spaces.
    Regards
    Jim


    Originally posted by juee
    I insert data into a column of VARCHAR and size 50 of SQL Server database. But the data inserted is of length 15. When it is inserted , it is done with trailing blank spaces padded till the length is 50.

    Any help ?

  3. #3
    Join Date
    Feb 2002
    Posts
    2,232
    Why do you want trailing blank spaces ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •