#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    1
    Rep Power
    0

    Question truncating string


    Hello,

    I am trying to delete some unreadable characters from one of the database fields called "state".
    I have used the rtrim command as rtrim(state) but it does not work. But when I manually go to each record I see that there is a space right after the state.
    e.g. 'NJ' actually is 'NJ '

    same is the case with some other fields in the database and rtrim does not work with them.

    Any one got a clue??
    Thanks
    SaadG.HQ@keyence.com
  2. #2
  3. // no comment
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2001
    Posts
    1,645
    Rep Power
    40
    how exactly are you doing this? try this query : "UPDATE [your_table] SET state = RTRIM(state)"

    that should do it.

IMN logo majestic logo threadwatch logo seochat tools logo