For more videos visit:
https://adeptia.com/products/touranddemo.html
Here's more documentation on using this function:
Now once the above DB Info object is created, open up the Mapper and for the specific Target element enter this rule:
SELECT FIELD = [EMPNO] FROM DB.TAB = [DBInfoActivityName].[EMP] WHERE {ENAME= ‘Smith’}
Change the parameters between the brackets [].
In this example, EMPNO in the Select part is the field value being returned from the database.
The DBInfoActivityName is the name you will replace with your DB Info object name.
EMP is the table name.
Between { and } is the Where clause, ENAME (field in the table) = 'Smith' or it could be a field from the Source schema. Just double click on the partcular source field in the Source schema panel and it will automatically appear here.
In order to embed multiple Where conditions, look at the syntax in the below example:
SELECT FIELD=[output_value] FROM DB.TAB=[DbInforName].[TableName] WHERE {[fieldname=SourceFieidName_OR_$VariableName] and [input_value = SourceFieidName_OR_$VariableName]}
Steps to use DB Query function:
1. Create Connection Info variable. To know how to create connection info variable refer to Declaring Connection Info Variable section under Using Data Mapper section of user guide.
2. After creating connection variable you can now apply DB Query function. To know how to apply DB Query function, refer to Using DB Function section under Using Data Mapper section of User Guide.
Note: According to your requirement following is the syntax of the DB Query function. You can directly use this syntax in textual rule box.
DBQuery {SELECT MAX(DAT_TRX_DATE_O) FROM CDS.DAT WHERE DAT_ACTION_CODE IN ('OEX','CLA') AND DAT_DBR_NO='$Input_JJ_test_2column/Root/Record/Int_Date',$connectionVar , false}
Here:
connectionVar is name of the connection info variable that you have created in step1.
Refer to the attachment related to Content Based Routing solution where Lookup function is being used to determine which process flow to call.
Comments
0 comments
Article is closed for comments.