PlugIns.JdbcSlim.UserGuide.2KeyBenefits.3MultiTableStatement

PlugIns JdbcSlim UserGuide 2KeyBenefits



To prepare business data often more than one table must be updated or data inserted into multiple tables.
But for a business user this is often not important. Having said that the requirements should hide this technical detail.

This can be done with Jdbc Slim.

The technical implementation is moved into a Start Up and Tear Down page:


Included page: >SqlStartUp

The Scenario with two execute statements

Scenario Get The Name name and phone number phone for id id
execute select Name from TestData where ID = '@id'
show success
show rawResult
show resultSheet
$name= getColumnValueByName NAME
#
execute select * from TestData where ID = '@id'
show success
show rawResult
show resultSheet
$phone= getColumnValueByName Phone



Define connection details and open a connection


Define Properties ScriptDatabase
key value
.include TestDatabase
cmd select * from TestData

Script SQLCommand ScriptDatabase
openConnection





The business defines the requirements in a table



Get the name and phone number for id
id name? phone?
2 Ben >0
4 Till >100
3 Tom >10
2 =~/Be/ >5



Included page: >SqlTearDown

Close the connection

Script
closeConnection


See also: 7UsingSqlInScriptsAndScenarios

Contents: