SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot OptMediaJohn's Avatar
    Join Date
    Aug 2002
    Location
    Seattle
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    trim a tab from a column (was "Query Help")

    I am trying to do a trim() on a column that includes a tab after every entry. However, I am having trouble making the statement syntax.

    Here is what I have:

    members_ = table
    fullname = column that includes the data I want to trim


    Select fullname_ from members_ and TRIM(BOTH ' ' members_);

    This is the last query I tried, however I get syntax error. I am not very skilled in sql, so any help is appreciated.

    Thanks,

    John
    Opt-Media.com
    Optimize Your Revenue

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,262
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    what database are you using?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Guru
    Join Date
    Jan 2004
    Location
    Uppsala, sverige
    Posts
    697
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Code:
    select trim(trailing '<tab-character>' from fullname_) from members_
    That's standard SQL.


Bookmarks

Posting Permissions

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