Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Location
    Nottingham - UK
    Posts
    113

    Unanswered: Unwanted Character Space in field

    Hi All

    I have a column in a database the most of the records have a space before the first character in a text field.

    Is it possible to do a update query of sorts to go through the records and delete the first space if any ?

    Thanks

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    You can do a ltrim in your update statement. So update table set field = ltrim(field). Do you want to delete all leading spaces or just 1 ?

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    don't forget to add a WHERE clause, so that you update only those rows that meet the condition

    rudy

Posting Permissions

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