Topic
1 reply Latest Post - ‏2013-05-21T22:52:54Z by jkrause
StaceyRG
StaceyRG
4 Posts
ACCEPTED ANSWER

Pinned topic Determining highest SCR number in 6.4

‏2013-05-20T21:38:14Z |

In a non-DCIM database, it is easy to determine the highest SCR number:

ccm query -n probtrac_seed -type admin

ccm attr -s next_problem @1

 

However, on a DCIM system where the current database started back at 1, instead of starting at some number greater than the previous database, this method will not work. Besides doing a query that returns all SCR numbers in the system, is there a way to determine the highest SCR number for each DCIM database?

Updated on 2013-05-20T21:38:56Z at 2013-05-20T21:38:56Z by StaceyRG
  • jkrause
    jkrause
    10 Posts
    ACCEPTED ANSWER

    Re: Determining highest SCR number in 6.4

    ‏2013-05-21T22:52:54Z  in response to StaceyRG

     

    There is no built-in function of which I am aware that will return the highest problem number used in the database. You would have to query for all objects of type 'problem' and sort the output numerically:  
     
    ccm query -t problem -f "%problem_number" -u -ns | sort -nr | head -1

    Jeff