我有以下代码,它给了我一个The column index is out of range:1, number of columns 0
def Column = resXml.DBRange.db*.text()
def Points = resXml.DBRange.points*.text()
//sorting it all out into a multidimensional array (index per index)
bigList = [Column, Points].transpose()
//iterating through the array
bigList.each
{//creating two smaller lists and making it readable for sql part later
def column = it[0]
def points = it[1]
//further splitting the points to test each
pointList = points.split(" ")
pointList.each
{//test each points range per column
def sqlResult = sql.rows "select * from my_table where ${column} <> ",[it]
log.info sqlResult
}
}
sql.close();
return;
我不明白,因为当我说log.info it
(并注释掉SQL)而不是log.info sqlResult
时,我会找回所有列名称