I was wondering if I can run a report in the K1000 that would give a total number for a particular field. 

We have Dell Optiplex 755's in each of our schools. I want to run a report that has the total number of Optiplex 755's in each building.  I wanted the report to look something like this:

Optiplex 755s in the 10.48.x.x range would equal 300
Optiplex 755's in the 10.56.x.x range would equal 200.

I can get a total number of Optiplex 755's in the district, but I'd like to break it down per IP range.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1
You want to group by the first two parts of the IP address, and you can do that using substring_index:
SELECT substring_index(IP, ".", 2) as SUBNET, count(ID) as Count
FROM ORG1.MACHINE
WHERE CS_MODEL = "Optiplex 755"
GROUP BY SUBNET
For a more generic version that includes all of the models in each range you can include the model in the group by statement:
SELECT substring_index(IP, ".", 2) as SUBNET, CS_MODEL, count(ID) as Count
FROM ORG1.MACHINE
GROUP BY SUBNET, CS_MODEL

Answered 02/25/2016 by: chucksteel
Red Belt

Please log in to comment

Answers

0
hello,

two inprotu ideas:
  1. Put the hands in the SQL of the report...
  2. Create a Custom Inventory Field rule that valorizes the field with the first 2 octet of the IP of the device (e.g.:10.48) and then in the report wizard ''break'' for this field.

Kind regards,
Marco - StockTrader
Answered 02/25/2016 by: StockTrader
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share