Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Hong Kong
    Posts
    15

    Unanswered: How to concatenate text of two different records?

    Hello dears,

    For example, I have a table contains records as follows:
    table1
    ID Name Remark
    1001 Sam M1234
    1001 Sam N1234
    1001 Sam O1234
    1002 Rita X1234
    1002 Rita Y1234
    1002 Rita Z1234

    The output I want is as follows:
    select id, remark from table1 group by id

    ID Remark
    1001 M1234N1234O1234
    1002 X1234Y1234Z1234

    Anybody can help how to build a select statement to concatenate text of different records?

    Thanks
    Sarbeswar

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    wow, you've posted this in the SQL forum, the MySQL forum, the Oracle forum...

    please don't do that
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Feb 2004
    Location
    Hong Kong
    Posts
    15
    Can I use Group_Cancat() function in Oracle9i?

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    of course not
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Only if YOU write it

    Read this thread and check the link provided within. Maybe it'll help.

Posting Permissions

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