question

DucheminDominique-7551 avatar image
0 Votes"
DucheminDominique-7551 asked AlexZhu-MSFT answered

Collection question

Hello,

I have a collection define as:

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_NETWORK_ADAPTER_CONFIGURATION on SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.ResourceID = SMS_R_System.ResourceId
where SMS_R_System.OperatingSystemNameandVersion like "%server%"
and (SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSPrimaryServer = "10.1.20.154"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSPrimaryServer = "10.2.112.21"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSPrimaryServer = "10.6.58.224"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSPrimaryServer = "10.12.87.5"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSPrimaryServer = "10.5.20.52"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSSecondaryServer = "10.1.20.154"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSSecondaryServer = "10.2.112.21"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSSecondaryServer = "10.6.58.224"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSSecondaryServer = "10.12.87.5"
or SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSSecondaryServer = "10.5.20.52")

Is there any possibilty to get it under the form:
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_NETWORK_ADAPTER_CONFIGURATION on SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.ResourceID = SMS_R_System.ResourceId
where SMS_R_System.OperatingSystemNameandVersion like "%server%"
(SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSPrimaryServer in ("10.1.20.154", "10.2.112.21", "10.6.58.224", "10.12.87.5", "10.5.20.52")
or
SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.WINSSecondaryServer in ("10.1.20.154", "10.2.112.21", "10.6.58.224", "10.12.87.5", "10.5.20.52"))

Thanks,
Dom

mem-cm-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AlexZhu-MSFT avatar image
0 Votes"
AlexZhu-MSFT answered

Hi,

I'm afraid this is not possible. The WMI uses the WQL language which is only a subset of the SQL language, and doesn't include the IN operator. In the above case, we can only use the OR operator.

Regards
Alex

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.