I have tried the following code now and seems to be nothing is being inserted into the database table. I have executed the following code and the result is displayed as null.
import groovy.sql.Sql; import java.sql.ResultSet; import java.util.Properties; sql = Sql.newInstance("jdbc:oracle:thin:@localhost:1521:XE","username", "password", "oracle.jdbc.driver.OracleDriver") sql.eachRow("select ID, NAME from A where ID not in (select id from B)") { row-> sql.executeInsert "INSERT INTO A (ID, Name) VALUES ($row.ID,$row.Name)" } -- View this message in context: http://groovy.329449.n5.nabble.com/Oracle-Insert-Data-from-one-table-to-another-table-using-Groovy-tp5734285p5734303.html Sent from the Groovy Dev mailing list archive at Nabble.com.