Update Collection by Query rule and condition

Hi,
I have one collection called Windows 7 Machines.
I've added a Query that I made like this:
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_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID
= SMS_R_System.ResourceID where SMS_G_System_OPERATING_SYSTEM.Caption like "% Windows 7 %"
And it's working.
What I want the collection to do, is to update membership so Members Count is based on clients that is actively communicating with the SCCM server, and exclude those who haven't communicated with the server for 40 days.

GREAT NEWS :D  I've managed to configure the Clients Status by following the previous guide that i posted from technet.
Now is the only challenge to complete the Query. As i wrote above :
I don't understand is where to put the "client = active" statement, i've tried like this but it gives me This query has a syntax error, Are you sure you want to save it? Yes / No
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_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID
= SMS_R_System.ResourceID where SMS_G_System_OPERATING_SYSTEM.Caption like "% Windows 7 %" client = active
Thank you very much for your time.

Similar Messages

  • SQL Query clauses and conditions

    Hi,
    I wanna to get the entire conditions specified in the SQL query to do a specific treatement on them.
    in fact, i want to do a syntaxical analyse on the query.
    If there is a specific table where query in stored is seperate clauses, objects invoked, conditions used,..., please let me know.
    elsewhere, il you have a PL/SQL program that do that, it'll be wonderfull.
    Best regards;

    thank for your reply, but what i need is not the query text, but the seperated query clauses and conditions.
    best regards

  • Unable to access Query Rules and Result Sources in SSA

    I have access to our Search Service Application (SSA) within Central Administration.  I am able to get to all of the options within Search Administration except for Query Rules and Result Sources.  Does this require farm admin access or is there
    something special that needs to be done for access to these two areas?  I can get to all of the Diagnostics, Crawling, and the other Queries and Results options without issue.  Our farm admin has been looking at it, but we have not been able to determine
    why my access is not allowing me to get to those options.  Any info you may have about this will be much appreciated.
    Thanks!
    Brian

    Hi scalawagd,
    This issue seems to be about permissions. Please add the user into the search service administrator group and give him full control, compare the result. You can try to give the user permission like the screenshot:
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • TS1717 iTunes "Terms and Conditions Have Changed Before you can proceed you must accept the terms and conditions" is on an infinite loop.  No matter how many times I agree, when I go to update my apps the terms and conditions have changed link reappears.

    Can anyone help me?  Suddenly (i.e. just a few minutes ago) this problem has appeared.  I attempted to update two apps on my iPad.  The Terms and Conditions agreement comes up, I read the terms and conditions, I agree to them, I click AGREE, it disappears, I reclick on update and the Terms and Conditions agreement appears and we start the mobius strip all over again.  I tried to see if it was just on my iPad by trying to download a new app on my iPhone.  same problem.  Anyone have advice on how to resolve this issue?  Oh, and of course, Apple has declared my two new devices to be out of warranty and want me to pay to ask how to fix a problem caused by their own software.  Lovely.  so helpful.  Hey Cupertino ... are you paying attention?  I might start tweeting about this.

    I updated the software on my iphone4 tonight and ran into this same endless loop - "itunes terms & conditions have been changed" - go to itunes, aceept - back to the "T&C have been changed message" with no ability to do anything in the app store until I accepted the new terms.
    While not a very direct solution, I was able to finally accept the terms in a way that seem to register with apple by making a purchase through iTunes on my computer. This forced me through updating my payment information and updating my iTunes software to the latest edition (which I had not yet taken the time to do).  After doing both of these, iTunes took me through the terms & conditions on two separate pages, but ultimately allowed me to purchase my song.  Once I completed these steps, it fixed the problem on my phone, so now I can update my apps and download new ones without running into that loop.
    Hope this helps!!!

  • New iOS update freezes phone at terms and conditions screen

    I am attempting to update the latest iOS and going through the steps it freezes at the Terms and Conditions screen. I can't go forward or back. It looks as though I can make the selections (agree/disagree) but when I click on it nothing happens. HELP!

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • Combining query rules and wildcards

    Hi,
    is there a way to use wildcards and query rules in one query? For example i have a keyword "customer" which allowes me to search in a specific list. Now i would like search with additional wildcards because i maybe don't know the whole name of
    the customer e.g. "customer micro*". The problem is now, that when a i use the wildcard in this combination, i do not get any results.
    Many thanks! 
    Michael

    maybe i used the word keyword in a wrong context. I didnt mean the keywordquery, only the keyword"Query Contains Action Term"
    you can define in the query rules configuration. 

  • HT4623 my phone updated but stays on terms and conditions its a four

    how do you get the phone off the terms and conditions after downloaded new sotware

    Hi, David.
    I would recommend trying the steps in the article below.
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    Once these steps are processed, attempt to accept the terms and conditions.
    Cheers,
    Jason H.

  • REST API and best bets / query rules

    Is there a bug in this?  I can not get best bet results regardless of the query string.  For example, the following (according to MSDN documentation) should process the query rules and return a best bet.  But it doesnt.  Am I doing something
    wrong in the query?  It only seems to return ordinary results.  Performing the same search via Sharepoint's UI returns the best bet at the top.
    $.ajax({
    url: "http://myserver/sites/mysite/_api/search/query/?processbestbets=true&enablequeryrules=true&querytext='" + searchText + "'",
    type: 'GET',
    headers: {
    "accept": "application/json; odata=verbose"
    success: myCallback,
    error: function(data) {
    alert(data.responseXML.text);

    Hi Scott,
    With EnableQueryRules and ProcessBestBets set to true in the search rest api, we can get the promoted results(best bets) in SharePoint 2013.
    I recommend to type the search rest api URL in the browser directly and then check if the best bets are displayed at the top of the search results.
    It will not displayed inside the table for normal results.
    Please also make sure that the query text matches the query rule condition.
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Apps wont update (terms and conditions)

    Okay so, when i go to the app store, it all seems fine but when i go to the updates there is a picture of the app and all the text is blue, and underlined, like a link. When i go into the updates, and i press update all it says terms and conditions have changed. I have to accept it or whatever (nobody actually reads it anyway). But just like in the updates thing.. It pops up from the bottom of the screen with times new roman, and it doesnt look liek something from apple. With links that are blue says send by email blah blah blah... So i press accept and it says.. "your session has timed out. Try again." does that all the time. So i cant buy or update games. My ipad isnt jailbroken.
    Also another thing... My gamecenter works when i go into the app.. But when i go into fruit ninja, and play multiplayer it doesnt take my 5 stars and i can never play with anyone.
    P.s. apple employees and facebook employees fix facebook, doesnt work on my ipad

    I'm sorry, but I don't know the answer to the first part. As for the facebook-thing: if you mean it keeps crashing...then...yeah, that's normal. MIne hasn't crashed in a while, but it used to do that a LOT.

  • ATG Search | Query Rules are not executing

    Hi,
    We want to put some search relaxation, for example partial entry of a search term returns results i.e.if user enter "shi" results should show all shirts.
    Followed following steps for that,
    1) Created query rules for wildcard pattern with a actions.(For example created a pattern "shi*" and action "prop,string,displayName,Shirt" , so that when a user enter "shi", search results would return all products whose name contain "Shirt" or "Shirts".
    2) After indexing, verified Query Rules are applied; using "Index Review" (QueryRuleLoad -- 4 rules, 4 patterns, 4 actions, from stream)
    3) Layered the component /atg/commerce/search/catalog/QueryRequest property ruleMode to exec so that search request contain "ruleMode=exec" as per ATG docs.
    4) Clear and Disable cache using the component : /atg/search/routing/CacheService/
    5) Search submitted on site for "shi".
    6) Verified Search request XML that "ruleMode=exec" is being send to Search Engine.
    But as per query rules, search results/response are not coming, verified response XML, but didn't find any clue.
    Are we missing any configuration for query rules to execute or the pattern & action which we have created are not proper ?
    Thanks,
    Sarbajeet

    Hi  ,
    According to your description, my understanding is that you want to configure Query Rule for the SharePoint Contextual Search (by default its result page is osssearchresult.aspx).
    As far as I know, the Query Rules
     work in the SharePoint Contextual Search when you define them on site level. You can create your query rule in
     your Site ->  Site Settings -> Search -> Query Rules.
    Meanwhile the SharePoint Contextual Search is based on the result sources defined in the Site Settings->Search -> Result Sources, you need to make
     the result source of your Query Rule to the above Result Source.
    Reference:
    http://sharepoint.stackexchange.com/questions/64393/where-to-define-query-rule-and-when
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • FSCM-COL: Prerrequisites and conditions of Collection rule

    Dear experts,
    How can I enhance BADI UDM_BASIS_RULE to modify the prerequisites and conditions of a basis rule? Is it in method CHECK_SELOPTS? Or directly in method EVALUATE?
    Thanks!

    Three points
    1) I believe you meant UDM_COLL_ITEM in your above mesg
    2) Correction to my above mesg - you can use fields only from UDM_COLL_ITEMS and UDM_COLL_KEYFIG tables
    3) Yes, you are right in your first mesg - you can use method - CHECK_SELOPTS
    Edited by: Deep Patel on Oct 12, 2010 8:42 PM

  • SCCM Report for Applicable and Installed Updates Collection Wise

    Hi All, I was looking for a report on Applicable and Installed Updates Collection Wise and got this below query on the Internet and want to create a SCCM report with this below query. How to make this query working in SCCM report?
    Do I need to add prompts, if yes please guide me on adding prompts.
    SELECT
    DISTINCT
    SYS.Name0
    AS [Server Name], SIS.SMS_Installed_Sites0 AS [Site Code], UCS.Status AS [Patch Status Code],
    CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status', UI.BulletinID AS [Bulletin ID],
    UI
    .ArticleID AS [Article ID], UI.
    Title
    FROM
    v_R_System AS SYS LEFT OUTER
    JOIN
    v_Update_ComplianceStatusAll
    AS UCS ON SYS.ResourceID = UCS.ResourceID INNER
    JOIN
    v_UpdateInfo
    AS UI ON UCS.CI_ID = UI.CI_ID INNER
    JOIN
    v_RA_System_SMSInstalledSites
    AS SIS ON SYS.ResourceID = SIS.
    ResourceID
    WHERE
    (UCS.Status IN ('2', '3')) AND (UI.ArticleID IN ('972270', '974392', '973904', '969947')) AND (SYS.Name0
    IN
    (SELECT DISTINCT v_FullCollectionMembership.
    Name
    FROM v_FullCollectionMembership INNER
    JOIN
    v_R_System
    ON v_R_System.ResourceID = v_FullCollectionMembership.ResourceID AND v_R_System.Active0 = 1 AND
    v_FullCollectionMembership
    .CollectionID IN ('Collection ID'
    ORDER
    BY
    [Patch Status Code]

    Yes it can be done and please run the query which i have shared in the thread
    I again pasted the query for you below..
    SELECT DISTINCT
    SYS.Name0 AS [Server Name], CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status',
    UI.BulletinID AS [Bulletin ID], UI.ArticleID AS [Article ID], UI.Title
    FROM         v_R_System AS SYS LEFT OUTER JOIN
                          v_Update_ComplianceStatusAll
    AS UCS ON SYS.ResourceID = UCS.ResourceID INNER JOIN
                          v_UpdateInfo AS UI ON UCS.CI_ID
    = UI.CI_ID
    WHERE     (UCS.Status IN ('2', '3')) AND (SYS.Name0 IN (SELECT DISTINCT v_FullCollectionMembership.Name
    FROM v_FullCollectionMembership INNER JOIN
         v_R_System ON v_R_System.ResourceID = v_FullCollectionMembership.ResourceID AND v_R_System.Active0 = 1 AND
                                                       v_FullCollectionMembership.CollectionID
    IN ('XXX00000')))
    Kamala kannan.c| Please remember to click “Mark as Answer” or Vote as Helpful if its helpful for you. |Disclaimer: This posting is provided with no warranties and confers no rights

  • SCUP - Deploy Updates for both Windows 7 and Windows 8.1 rules Detection

    Hi all,
    I encounter a little issue regarding the update deployment from SCUP.
    For example, I would like to deploy Firefox updates on both Windows 7 and Windows 8.1. Firefox Updates are deployed and installed on Windows 7 without any problem. But Nothing happen on Windows 8.1.
    I think my problem is on my Installable Rule I have created. As it's not possible to select Windows 8.1 as a condiftion (like Windows 7) I have created a WMI query.
    Before using a WMI query, I tried to use Major version and Minor version without success.
    Does anyone has already used this sort of scenario ?

    Shouldn't you do the following things (see also:
    http://technet.microsoft.com/en-us/library/hh134743.aspx):
    Add Windows Language is French to the top AND;
    Change the second AND to an OR;
    Add the WMI Query to the new OR (so it's at the same level as the
    Windows Version = Windows 7 SP1);
    Remove the last OR (as it's not being used anymore).
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Reporting or Query Rule to get the machines with particular software Update.

    Hello Guys,
    My Device collection has 10 machines, Need to get information whether these machines have
    Service Pack 2 for Microsoft Office 2010 (KB2687455) 32-Bit Edition
    installed,
    Please help me with the query rule or correct reporting to get the information. Since the Updates are
    not listed under Add or Remove programs am not able to use other reporting which i use normally.
    Please assist.

    Are you sure that you don't see the SP in add/remove programs if you click "View installed updates"?
    You should...
    You can use hardware inventory to pick up the info, but you need to enable the Hardware Inventory Class "quick fix engineering (Win32_QuickFixEngineering)" in the client settings.
    Then you can use a query, e.g.
    SELECT
    HotFixID0
    ,Description0
    ,InstalledOn0
    FROM
    v_GS_QUICK_FIX_ENGINEERING

  • Syntax of a query rule to exclude results from site collection

    Hi,
    I'm trying to edit a query rule to exclude results from a site collection.
    I'm coping the "Local SharePoint Results" and want to add something like -path=http://server/sites/demo/*
    but somehow it doesn't work. can someone help with the exact syntax (should to write http, "", to write with {} etc.)
    keren tsur

    -SiteId:<guid>
    should work. Or:
    -path:http://server/sites/sitecollection
    Thanks,
    Mikael Svenson
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

Maybe you are looking for

  • Can QT Pro capture streaming video from webcams?

    I'm trying to capture segments of video from the National Geographic's Wildcam Africa, in which they have a live feed of video from a waterhole in Africa 24/7. Can QT Pro do this? (All I can find is info on creating streaming video with QT.)

  • How do I stop thumbnails from opening when inserting pdf in Acrobat XI.

    Operating system is Windows 7. I just upgraded from Acrobat X. When I inserted a pdf into another pdf it was done. In Acrobat XI when I insert the thumbnails column opens up and I have to click on it to close it. This is annoying.

  • Move to first record of ref curser after fetch

    I have the following package (v2 is not used in this example): CREATE OR REPLACE PACKAGE test_ref_cursor AS TYPE gc IS REF CURSOR; PROCEDURE test_ref_cursor(v1 OUT gc ,v2 IN VARCHAR2 ,v3 OUT VARCHAR2); END; CREATE OR REPLACE PACKAGE BODY test_ref_cur

  • EVCOM does not actualize Linked Cell

    When entering comments and sending it with EVCOM, i found a problem when changing the current view. The linked cell (which is the clell controlled by the EVCOM function, where the comment is entered), the furher comment is still visible, if there is

  • Adobe live pdf only for AIR ?

    Hello, How can i use the Adobe live PDF generator, i've seen a few exmples ... it requires the AIR for the examples i've seen, but does it support flex i.e., pdf over browser? if so, is there a good example code i could find ? thanks for the help.