SCCM 2207 and Collection query System Computer Model

PerserPolis-1732 1,351 Reputation points
2022-09-20T14:23:01.717+00:00

Hi,

I have created a Collection and want to have all Notebooks from Manufacturer "Fujitsu". I have a query but it does not work

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Model like "%106017%"

Can you help?

Regards

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Jason Sandys 31,161 Reputation points Microsoft Employee
    2022-09-20T19:35:07.957+00:00

    Please define "it does not work". What exactly does that mean? Does it thrown an error, does it crash the console, does it bluescreen your domain controller, does it initiate a self-destruct, does it not return all expected results, does it not return some results, something else? We can't help if we don't know exactly what you mean.

    What collection is this collection where the membership query exists limited to and what does it contain for members?

    Also, this isn't your issue, but using multiple wildcards in a single condition in your WHERE clause is terrible for performance and has a huge impact on SQL performance. Avoid doing this at all costs. Given that you know the data, there is no reason to use a wildcard at all and you should just be checking if the property is equal to the desired value.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. PerserPolis-1732 1,351 Reputation points
    2022-09-21T07:07:08.007+00:00

    I resolved that issue himself

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM_ENCLOSURE.ChassisTypes in ( "8", "9", "10","11", "12", "14","18","21")

    0 comments No comments