Another new feature in ClicknDECiDE Builder 4.20 is its ability to retrieve the SQL order for a Query/400.
To achieve this, select the command <Insert> from the Query Tab in a ClicknDECiDE Builder project file, then the <Query/400> option in the resulting dialog box. The following screen will be displayed:
In the Query File Name zone, enter the library name and the query corresponding to the Query/400 and click on the Retrieve Now button or use the Browse button to search the Query/400 in your iSeries.
After a short pause, the SQL Query for this AS/400 Query will be displayed in the Retrieved SQL box. The SQL command can then be amended. When finished, click on OK to integrate it into ClicknDECiDE Vision SQL Editor.
Then you can switch to the ClicknDECiDE Builder Query Tab to rebuild the graphic DataSet Vision query with the selected fields, the criteria ands sort conditions.
Remark: the join conditions are also retrieved in case of multiple tables query, but the join types are not retrieved except the #1 type. You will need sometimes to define yourself in the ClicknDECiDE Builder Table Tab the join types if they are different than #1.