this is for testing purposes (automatic testing) SoapUI
def status = testRunner.testCase.getPropertyValue( "Status" )
def grid = testRunner.testCase.getPropertyValue( "Grid" )+"_V"
def grid1
if (["TABLE1","TABLE2"].contains(grid))
grid1 ="HUBCFG."+grid
else grid1 = "SDM."+grid
Option1
sql.executeUpdate "UPDATE " +grid1+" t0 set XXX='$status' WHERE t0.YYY='$grid'"
Option2
String bql = "UPDATE $grid1 t0 set XXX='$status' WHERE t0.YYY='$grid'" sql.executeUpdate bql
sql.commit()
log.info("Successfully committed "+grid1+ " To " + status)
i didnt find the answers clear cut anywhere, so i scraped them together.
Hope this helps someone
You should do:
Or
The single quotes will be added for you, and Sql.expand allows you to embed things like table names into the resultant templated Groovy String