SQL Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OptMediaJohn
    Registered User
    • May 2003
    • 11

    #1

    SQL Query

    Anyone good at SQL here?

    I am trying to make a query that replaces a tab in a column after every entry in that column. I started using trim(), but I don't think I know how to use it corrrectly.

    Here is what I have so far:


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


    What am i doing wrong?
  • cyber_ninja
    Twerk That Ass
    • Jul 2001
    • 2197

    #2
    dont do it

    Comment

    • OptMediaJohn
      Registered User
      • May 2003
      • 11

      #3
      Don't do it? Why? It has to be done...

      Comment

      • woj
        <&(©¿©)&>
        • Jul 2002
        • 47880

        #4
        can you try explaining again what you are trying to do?
        Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
        Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
        Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

        Comment

        • OptMediaJohn
          Registered User
          • May 2003
          • 11

          #5
          Ok, I have a table members_ with a column fullname_ . The column fullname_ has a tab after every name (caused from the import of this table into this database). I want to remove this tab after every name in that column. Someone pointed me to TRIM, however I don't think I am doing that so well.

          Does that make sense?

          Comment

          • woj
            <&(©¿©)&>
            • Jul 2002
            • 47880

            #6
            make a backup of the table,
            and then try something like this perhaps?
            UPDATE members_ SET fullname_=TRIM(fullname_)

            If you are still having problems you can hit me up on icq:33375924
            Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
            Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
            Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

            Comment

            • OptMediaJohn
              Registered User
              • May 2003
              • 11

              #7
              Big thanks to WOJ on this, looks like its running perfectly!

              Thanks again!!

              Comment

              • V_RocKs
                Damn Right I Kiss Ass!
                • Nov 2003
                • 32467

                #8
                WOJ gives advice? WOW!

                Also, you can TEST it first by doing this,

                SELECT TRIM(fullname_) from members_ SET

                Comment

                Working...