Query Help

  • I need to convert this data

    Name Relationship Address

    Adelberg Parent 22Mesa Dr

    Courtney Guardian 29 Mesa Dr

    berg Grandparent 36 Mainst

    into

    column1 column2 column3

    Adelberg Courtney berg

    Parent Guardian Grandparent

    22 Mesa Dr 29 Mesa Dr 36 mainst

  • You will find answer here:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Have you looked at Pivot and Unpivot in T-SQL? They'll probably do what you need.

    Honestly, though, I usually leave that kind of thing up to the presentation layer. Easier and more flexible there.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply