列索引超出Groovy Sql的范围

列索引超出Groovy Sql的范围,sql,postgresql,groovy,soapui,Sql,Postgresql,Groovy,Soapui,我有下面的代码,它给了我一个列索引超出范围:1,列数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 b

我有下面的代码,它给了我一个
列索引超出范围:1,列数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;
def Column=resXml.DBRange.db*.text()
def Points=resXml.DBRange.Points*.text()
//将其全部排序到多维数组中(每个索引的索引)
bigList=[Column,Points].transpose()
//遍历数组
大名单
{//创建两个较小的列表,并使其可读,以供以后的sql部件使用
def column=it[0]
def points=it[1]
//进一步拆分点以测试每个点
点列表=点。拆分(“”)
pointList.each
{//每列测试每个点的范围
def sqlResult=sql.rows“从my_表中选择*,其中${column}”,[it]
log.info sqlResult
}
}
sql.close();
返回;

我不明白,因为当我说
log.info it
(并注释掉SQL)而不是
log.info sqlResult
时,我得到了所有列名

请将错误与代码中的一行关联起来。您的sql不应该有一些
:比较
?不确定
def sqlResult=sql.rows“从我的${column}表中选择*,[it]
是有效的sql吗?谢谢@tim_yates。我把SQL的结尾改成了
where${column}'${it}'
唉,我觉得这太傻了