myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


2nd query shows more than the 1st query... why?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> Microsoft Systems Management Server >> SMS 2003 >> 2nd query shows more than the 1st query... why? Page: [1]
Login
Message << Older Topic   Newer Topic >>
2nd query shows more than the 1st query... why? - 11/7/2008 12:00:37 PM   
JoeG

 

Posts: 2
Score: 0
Joined: 11/7/2008
Status: offline
I am running a query to to get the info from the machine... The 1st query will display results for a 150+ machines with the data collected. The 2nd query only gives me 60+. Can anyone tell me why?

1st Query:
select NetbiosName, IPAddresses, LastLogonUserName from  SMS_R_System where IPAddresses like ##PRM:SMS_R_System.IPAddresses## order by NetbiosName, IPAddresses


2nd Query:
select SMS_R_System.NetbiosName, SMS_R_System.IPAddresses, SMS_R_System.LastLogonUserName, SMS_G_System_COMPUTER_SYSTEM.Manufacturer, SMS_G_System_COMPUTER_SYSTEM.Name, SMS_G_System_PC_BIOS.SerialNumber from  SMS_R_System inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.IPAddresses like ##PRM:SMS_R_System.IPAddresses## order by SMS_R_System.NetbiosName, SMS_R_System.IPAddresses, SMS_G_System_COMPUTER_SYSTEM.Manufacturer


All of the information is going off of the value of an IP ADDRESS INPUT value.
Post #: 1
RE: 2nd query shows more than the 1st query... why? - 11/7/2008 2:39:01 PM   
gjones


Posts: 903
Score: 60
Joined: 6/5/2001
From: Ottawa, Ontario, Canada
Status: offline
The query are not the same and this is your issue.

Q1, includes PCs that do not have the SMS / ConfigMgr Client
Q2, Inluded other things like Manufacturer for SMS/ ConfigMgr Clients ONLY.




_____________________________

Garth@enhansoft.com

For a List of my Articles
http://www.myitforum.com/contrib/default.asp?cid=116
Blogs:
http://smsug.ca/blogs/garth_jones/default.aspx
http://myitforum.com/cs2/blogs/gjones/default.aspx


(in reply to JoeG)
Post #: 2
RE: 2nd query shows more than the 1st query... why? - 11/8/2008 1:28:38 PM   
JoeG

 

Posts: 2
Score: 0
Joined: 11/7/2008
Status: offline
Is ConfigMgr Client  the same as the sms client? I am showing the machines do have the client installed on them and for some reason... they are not connecting to the proper management point from the systems management console in the control panel.

(in reply to gjones)
Post #: 3
RE: 2nd query shows more than the 1st query... why? - 11/8/2008 1:38:35 PM   
gjones


Posts: 903
Score: 60
Joined: 6/5/2001
From: Ottawa, Ontario, Canada
Status: offline
Yes they are the same, However your query are not giving your what you are asking for. For example
 
What SMS has Inventory for
select count(*) from dbo.v_GS_COMPUTER_SYSTEM

What SMS has discovered
select count(*) from dbo.v_R_SYSTEM
 
 
Notice that you are getting two different results. Your queries are mixing data from two different views and therefore are not giving your what you want.

_____________________________

Garth@enhansoft.com

For a List of my Articles
http://www.myitforum.com/contrib/default.asp?cid=116
Blogs:
http://smsug.ca/blogs/garth_jones/default.aspx
http://myitforum.com/cs2/blogs/gjones/default.aspx


(in reply to JoeG)
Post #: 4
Page:   [1]
All Forums >> [Management Products] >> Microsoft Systems Management Server >> SMS 2003 >> 2nd query shows more than the 1st query... why? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.607