Dashboard > Avoka Public > ... > Business Process Techniques and Patterns > Retrieving data from a database and saving as concatenated strings or lists in process variables
Retrieving data from a database and saving as concatenated strings or lists in process variables Log In   View a printable version of the current page.
Added by Yuri Ventsov , last edited by David Glen on Oct 18, 2007  (view change)
Labels: 
(None)

Please click here for full reference on SQLPlus DSC.

Using the Avoka SQL-Plus DSC

You can save data retrieved from a database into string process variables as concatenated strings or list variables.
The following process sample demonstrates how to retrieve data from a database and save the data into string or list process variables. You can import this archive file using archive manager and open it in the process designer.

First, we create variables, called 'names_string', 'emails_string', 'names_list' and 'emails_list' of types 'string' and 'list' and specify its properties as shown on the following picture.


The process workflow looks similar to the following.


In the first step of the process we retrieve data from the database and save data as concatenated strings into the string variables. The following picture shows settings to retrieve the data.



Optionally, you can check the 'prepared SQL statement' box to create a prepared SQL statement and specify query parameters. To test your statement, click the 'Test' button. This will display the first row of the result set retrieved from the database.

The following picture shows settings to save data from the database into the string variables.



You can specify any delimiter as an arbitrary string.

The second step we retrieve data from the database and save data as elements into the list variables.

The following picture shows settings to save data from database into the list variables.



The third step of the process logs values of all variables and saves the log file into a directory. After we run the process, we can open the log file generated from the data and saved in the local server directory that looks like the one shown in the following picture.



This service is useful when you need to save data from a database as concatenated strings or elements of lists.

Powered by Atlassian Confluence 2.7.2, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators