Results 1 to 2 of 2
  1. #1
    Join Date
    May 2014

    Unanswered: Dynamic Record to column- PLEASE HELP

    I need to create an SQL statement that will dynamically convert a row into a column. The main problem is that I do not know the name of the attributes or number of attributes at the time of running the query. This is because it dynamically changes based on metadata received.

    All I want to do it convert say:

    Name Address X Y Z
    A B C D E


    Name A
    Address B
    X C
    Y D
    Z E

    Is this still possible with Pivots (if so how) or is there a better method?

    Thank You
    Last edited by anotheruserondb; 05-06-14 at 21:00.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    I'd use SSIS.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

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