The "Set a variable using an SQL query" type allows you to update a variable with the result of an SQL query.


Information to provide:

  - Variable, variable on the card to be modified

  - Query type: OleBD or ODBC


An example for SQL Server, Access,or Oracle can be used for each type of OLE DB or ODBC connection.

All you need to do is replace the missing elements * in the connection string

The connection string could then be, for example:

Provider=sqloledb;Data Source=VS-7x6413\;Initial Catalog=myPDMtools;Persist Security Info=True;User ...


  - SQL query: You can use existing variables from the map in the query. Just enclose the variable name in | (AltGr +6)

        For example |CODE|


 


In this example, we retrieve the value of the CODE attribute and execute the query `SELECT MATIERE FROM ListeCuir WHERE CODE='value of CODE'`.


The valuation of the variables is calculated for each configuration, so in case the CODE attribute is different in the configurations, the query will be recalculated for each of them.