Results 1 to 6 of 6

Thread: Simple SQL

  1. #1
    Join Date
    Apr 2003
    Posts
    1

    Unanswered: Simple SQL

    Hi All,

    I have a table with 2 columns which looks like the following.

    ID Text
    -------------
    1 AAA
    1 BBB
    1 CCC
    2 DDD
    2 EEE
    2 FFF
    3 GGG
    3 HHH
    3 III

    Each ID can have multiple texts associated with it. I want to write a query that gives me the following output.

    ID Text
    -------------
    1 AAA; BBB; CCC
    2 DDD; EEE; FFF
    3 GGG; HHH; III

    I appreciate your help

    Thanks

  2. #2
    Join Date
    Apr 2003
    Posts
    18

    Re: Simple SQL

    hi,
    Try this
    http://sqlteam.com/item.asp?ItemID=11021
    http://sqlteam.com/item.asp?ItemID=2368
    Cheers,
    Gola

    Originally posted by malli
    Hi All,

    I have a table with 2 columns which looks like the following.

    ID Text
    -------------
    1 AAA
    1 BBB
    1 CCC
    2 DDD
    2 EEE
    2 FFF
    3 GGG
    3 HHH
    3 III

    Each ID can have multiple texts associated with it. I want to write a query that gives me the following output.

    ID Text
    -------------
    1 AAA; BBB; CCC
    2 DDD; EEE; FFF
    3 GGG; HHH; III

    I appreciate your help

    Thanks

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    nice one, golamunjal, those links look very familiar


  4. #4
    Join Date
    Mar 2003
    Location
    Bucharest, Romania
    Posts
    80
    I've been answered these kind of problems several times up until now. Please take a look at my replay for thread "view and link table" 14 March 2003.

    ionut

    PS
    R937 laught of golamunjal because he had the same kind of problem a few days ago, and those links were the replay of R937 for golamunjal question.

  5. #5
    Join Date
    Apr 2003
    Posts
    18
    R937 , i have given these link b'cause i had the same problem few days ago and ionut given me the links , it was not u.

    Cheers
    Originally posted by ionut calin
    I've been answered these kind of problems several times up until now. Please take a look at my replay for thread "view and link table" 14 March 2003.

    ionut

    PS
    R937 laught of golamunjal because he had the same kind of problem a few days ago, and those links were the replay of R937 for golamunjal question.

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    no, it was me

    http://dbforums.com/showthread.php?t...91#post2724391

    but i don't care, i mean, i give these answers to help people, it pleases me that people can use my answers even to the point of helping others the same way

Posting Permissions

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