Forum Discussion
kendall
LM Champion
3 years agoI think the import statement youโll need for the necessary library is:
import groovy.sql.Sql
And because itโs Oracle, youโll also need:
import oracle.jdbc.driver.OracleTypes
Then youโll need to create a sql object, something similar to this:
Sql sql = Sql.newInstance("jdbc:oracle:thin:@hostname:1521:dbname", "username","password","oracle.jdbc.driver.OracleDriver")
And finally, insert your sql query inside parentheses, like this:
sql.call()
Hope this helps get you started!