TomK
17 years agoContributor
Groovy script to setup test DB
Hi all,
I have been using groovy script to setup the test DB from a set of test data from another database (we have lots of test data).
Is there a way in Groovy (I admit I'm not an expert on Groovy) to insert the data from one DB to another DB without having to explicitly set the column names? It's getting a little labour intensive and it would be great help to have a script to iterate through the table and insert those rows in the test DB without having to manually create the SQL with the column names.
Essentially I want to retrieve the column names from the result set.
Thanks,
Tom
I have been using groovy script to setup the test DB from a set of test data from another database (we have lots of test data).
Is there a way in Groovy (I admit I'm not an expert on Groovy) to insert the data from one DB to another DB without having to explicitly set the column names? It's getting a little labour intensive and it would be great help to have a script to iterate through the table and insert those rows in the test DB without having to manually create the SQL with the column names.
Essentially I want to retrieve the column names from the result set.
Thanks,
Tom