Jump to content


SkubaSteeve

Help with Report Please

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.