Skip to content

Help with Report Please

Featured Replies

I am trying to get a Query into a Report for another user to be able to get report results. I have never built a report, and am VERY VERY Green with SQL

 

I have built a query which gives me the results I need but am unable to get the SQL Language figured out for other users to use reporting.

 

My query is as follows. I am trying to get the built in ethernet MAC address from all systems a Collection.

 

This is a copy and paste, I appologize for the formatting

 

select distinct SMS_R_System.NetbiosName, SMS_G_System_NETWORK_ADAPTER.MACAddress, SMS_G_System_NETWORK_ADAPTER.AdapterType, SMS_G_System_NETWORK_ADAPTER.Description from SMS_R_System inner join SMS_G_System_NETWORK_ADAPTER on SMS_G_System_NETWORK_ADAPTER.ResourceID = SMS_R_System.ResourceId

 

Thank you in advance

Kev

  • Author

The following report was given to me, it finds the info I need, but it does so with all systems, I need to be able to specify a collection that it runs against.

 

Select Distinct
CS.Name0,
NIC.Description0,
NAC.IPAddress0,
NAC.DefaultIPGateway0
from
dbo.v_GS_COMPUTER_SYSTEM CS,
dbo.v_GS_NETWORK_ADAPTER NIC,
dbo.v_GS_NETWORK_ADAPTER_CONFIGUR NAC
Where
CS.ResourceID = NIC.ResourceID
and CS.ResourceID = NAC.ResourceID
and NAC.ServiceName0 = NIC.ServiceName0
and NAC.IPAddress0 != ''
and NAC.IPAddress0 != '0.0.0.0'
Order by
CS.Name0,
NIC.Description0,
NAC.IPAddress0,
NAC.DefaultIPGateway0

 

I have grabbed a prompt from another report which allows to specify collection, but it still brings back the same results from all systems. I just need to tie them together somehow.

 

begin
if (@__filterwildcard = '')
SELECT DISTINCT CollectionID, Name FROM v_Collection ORDER BY Name
else
SELECT DISTINCT CollectionID, Name FROM v_Collection
WHERE CollectionID like @__filterwildcard
ORDER BY Name
end

  • Author

Under further inspection, this report gives me ip address information not the physical address (MAC) of the ethernet card

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.