Skip to content

SCCM 2012 Query Help

Featured Replies

Hi,

 

I'm looking for a little help creating a query statement to create a collection to look for software from a specific publisher that has been installed within the last 30 days.

 

I can get the collection to show all the machines with desired publishers software but I'm struggling to refine it to the last 30 days. Would a be better off using a report for this? If so then help with the query for that would be appreciated.

 

Thanks

  • 3 weeks later...

Hello,

 

my SCCM server works fine but i´m a SQL noob. My boss wants an overview where he can see installed Microsoft products for the members of different collections. There is already a very nice report in

Asset Intelligence with the name License 01A - Microsoft Volume License ledger for Microsoft license statements. You can choose a collection and it shows the quantity of installed MS Products.
But my boss doesnt want to choose the collection, he wants new columns with the collections. I tried to edit the existing report License 01A - Microsoft Volume License ledger for Microsoft license statements with integrated SQL Server 2008, report Builder 2.0 but i have no idea how to work with it and how to add the columns.
Any expert who can help me ?
4vmq3lvj.jpg
jszhs2nz.jpg
This is the query for the column inventoried quantity. Do i only have to add a collection ID from which i want to show the results ? I don´t want to choose the collection in the menu. The collection should always be in this report
xmoowkka.jpg

can you paste the SQL query here ?

 

Select t.FamilyName AS [Licensed Family Name],

t.ProductName AS [Licensed Product Name],

t.VersionCode AS [Version Code],

t.ChannelCode AS [Channel],

t.InventoryCount AS [inventoried Quantity],

@CollectionID AS [Collection ID]

from dbo.fnInventoriedSoftware(@CollectionID,@ChannelCode,NULL) t

  • 2 weeks later...
  • Author

 

Hi,

 

Thanks for this reply, I'm not very experiences with SQL, which parts of that do I need to change to change whit my own data? Just the Collection ID? Also is there a way a way to display a publisher column and only show the desired publishers?

 

Thanks

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.