Results 1 to 5 of 5

Thread: Oracle CONCAT

  1. #1

    Thread Starter
    Hyperactive Member LeeSalter's Avatar
    Join Date
    Oct 2002
    Location
    Notts, England
    Posts
    307

    Oracle CONCAT

    Is there a way to concatenate ore than two strings together using an ORACLE CONCAT statement. I don't want to have to resort to the following:-

    Code:
    CONCAT(CONCAT('A','B'),'C')
    ....as I've got four rows from a table that I need to concat together....
    Is there another way? I am unable to use a function as the DB techincaly belongs to another company and we're not allowed to add/alter the schema.

    Basically, the table I'm interested in contains addresses, the columns are ADDRESS1,ADDRESS2,ADDRESS3,ADDRESS4 and POSTCODE. I want to concat these using commas to separate them.

    TIA
    "I'm Brian and so is my Wife"

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Oracle CONCAT

    use the double pipe :
    Code:
    table.field || table.field2 || table.field3
    I though concat used more that two parts?
    Code:
    concat(table.field,table.field2,table.field3)
    Might be wrong on that.

    Post up if neither work

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160

    Re: Oracle CONCAT

    I just spent a little time in my SQL Server book, and couldn't find CONCAT

    Is that Oracle specific?

    If so, is there an SQL Server equivalent?
    Beantown Boy
    Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.

  4. #4
    Addicted Member
    Join Date
    Jun 2005
    Posts
    243

    Re: Oracle CONCAT


  5. #5
    Frenzied Member oceanebelle's Avatar
    Join Date
    Jun 2005
    Location
    my n00k.
    Posts
    1,064

    Re: Oracle CONCAT

    Quote Originally Posted by SeanK
    I just spent a little time in my SQL Server book, and couldn't find CONCAT

    Is that Oracle specific?

    If so, is there an SQL Server equivalent?

    Yeah it is... but if its SQL Server you want.. use +

Posting Permissions

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



Click Here to Expand Forum to Full Width