Adding values to array or map.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2016
09:38 AM
03-22-2016
09:38 AM
Adding values to array or map.
I need to add result of a DB query to an Array .Sort the array and print the results. So far, I have this method
def returntripDB = getEmployeeFromDB(db).toString()
public def getEmployeeFromDB(def database)
{
def query = "SELECT Id FROM [myDb].[myDb].[mytable] where co = '1' order by id desc"
def dbreturn = database.rows(query)
return dbreturn.id
}
on printing log.info "returntripDB" +returntripDB I have
returntripDB[6, 5, 4, 3, 29, 2, 1]
How can I store this in a array and sort the array?.
0 REPLIES 0
