Forum Discussion

Balasubramanian Murugesan's avatar
Balasubramanian Murugesan
Brass Contributor
Dec 26, 2018
Solved

OMS Query for exporting results in excel more than 10000 results

Hi, I have a simple query to fetch complete computer name based on AD Site code and tried running below queries. But certain AD sites has more that 10000 computer and only results first 10000 com...
  • Noa Kuperberg's avatar
    Dec 27, 2018

    Hi,

    Indeed there is a 10K cap on the result set size in the UI, but there are a number of ways to handle larger result sets.

    1. You can transform your results into an array, which can hold much more than 10K values. See this example, where over 40K values are put into a single array, that you can later export to excel. That would of mean you need to use excel formulas if you want to return to a tabular structure.

    2. Reduce the size of your results - you can use "distinct Computer", "summarize by Computer" or "summarize makeset" to remove duplicate values from your results (Also, if all you need is that computer's name, project only that column).

    3. Use the API - the 10K results limit is only a UI limitation, so if you use the API you'll always get the full result set. In your script, you can process the result set to create a CSV structure which excel can load.

     

    HTH,

    Noa

Resources