Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Posts
    67

    Unanswered: return transactions from supermarket

    Hi all,

    I need to convert data from the following format:

    TRANS_ID PRODUCT
    1 A
    1 B
    1 C

    to the following format:

    TRANS_ID PRODCUTS
    1 A,B,C

    Is there any function to return data like this ?

    Thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by djuritz View Post
    Is there any function to return data like this ?
    yes, the GROUP_CONCAT function
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Sep 2005
    Posts
    67
    Quote Originally Posted by r937 View Post
    yes, the GROUP_CONCAT function

    Thanks!!
    That's what I needed! :-)

Tags for this Thread

Posting Permissions

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