Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2011
    Posts
    2

    Red face Unanswered: Help with sql server query

    Hi,

    I need some help!

    how can i transform it?

    I've this table:

    ID|TEL
    AAA|12345678
    AAA|88215889
    AAA|48755125
    BBB|59941455
    BBB|47784125
    CCC|14787887
    CCC|47884558
    CCC|48898545
    ...

    and i'd like to transform:

    ID|COL1|COL2|COL3
    AAA|12345678|88215889|48755125
    BBB|59941455|47784125|NULL
    CCC|14787887|47884558|48898545
    ...


    HELP ME!!!

    TKS

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    take a look at recursive query or pivot
    Dave Nance

  3. #3
    Join Date
    Mar 2011
    Location
    Swindon, UK
    Posts
    2
    You may find this useful: Using PIVOT and UNPIVOT

Posting Permissions

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