column index out of range Groovy Sql

I have the below code which is giving me a “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
{//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(" ")
    {//test each points range per column
        def sqlResult = sql.rows "select * from my_table where ${column} <> ",[it]

I don’t understand because when i say it instead of sqlResult i get back all the column names

Source: sql

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.