Transpose Data from Duplicated records?

  • I have a view setup from an SMS database which lists servers. Within the results there is a field for IP Address. Obviously a server can have more than one IP address, so there will be more than one record for each server in the results set each showing the different IPs. The question is, how do I get from this:

    Server NameIP Address

    LBR123410.1.123.123

    LBR1234100.10.98.76

    to this:

    Server NameIP Address 1IP Address 2

    LBR123410.1.123.123100.10.98.76

    I know that it is possible to transpose using SQL if you know how many rows of data are to be transposed, but a server has an unknown number of IP addresses. How could this be achieved? It is in SQL2005.

    Many thanks.

  • Hi,

    You will get help from this link:

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=101541

    Regards,

    Puja

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

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