2

I've been working on a report based on SCCM data. ;-)

SELECT DISTINCT ResourceID
            ,   AdapterType0
            ,   MACAddress0

FROM    V_GS_NETWORK_ADAPTER 

WHERE   MACAddress0 is not null

I get a result like this:

ResourceID AdapterType0 MACAddress0
16777255 Ethernet 802.3 00:00:00:00:00:00
16777255 Ethernet 802.3 11:11:11:11:11:11
16777255 Wide Area Network (WAN) 33:33:33:33:33:33

But I would like to turn it around and get a result like

ResourceID AdapterType0 AdapterType1 AdapterType2
16777255 Ethernet 802.3: 00:00:00:00:00:00; 11:11:11:11:11:11 Wide Area Network (WAN): 33:33:33:33:33:33 NULL

I've tried with STUFF, but can't quite get the result I want.

Jgaard
  • 23
  • 3

1 Answers1

0

SELECT ResourceID,AdapterType0,AdapterType1,AdapterType2

FROM V_GS_NETWORK_ADAPTER WHERE ResourceID='16777255'and AdapterType2 is NULL

  • Yes that would be easy if data was organized like that, but it is not. It is organized as shown in the first table. – Jgaard Sep 13 '22 at 18:35
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 19 '22 at 06:39