Add Query to External Database (3.2.0)Last Updated: 03/07/2016 Introduced in Verision: 2.0
In Decisions 3.2 it is possible to Add Table, Add View, Add Procedure, Add Relationship, Add Query to the Database from any Designer Folder in the Portal.
Note: go through the following document to avoid SQL Server Database Permissions errors: http://decdocs3x.wpengine.com/sql-server-database-permissions/
In this example we will add a simple query to the existing database connection,
We start in the Designer Folder by navigating to the Datatypes/Database > Database Integration category on the Folder Action Panel and click Add Query option.
In the resulting pop-up window we pick an Existing Connection to the Northwind database and click Next.
In the resulting Query Settings window we Name the query, check Return Data checkbox, check Output Count if we desire to add output count. Then, we insert our Query. After this, we have to Run Query before we save it.
Moreover, we can define how many Rows we would like to output using Limit Rows option. In the Messages tab we can see the result of our query execution. If our query was invalid we would be able to see Error messages in this Tab.
If we switch to the Results tab we would be able to see actual results of our query execution.
In the Dynamic Type section we can see what type of Data is being returned by the query execution. We can change this in Return Data Option. In this example we have Create Type option. When finished, we can click Ok to save the query definition.
We can see that our Query Definition is created in our Designer Folder in the Portal. Next, we can use it in the Flow with Run query GetAllCustomers step that can be found in Integrations > My Integrations > Database > Northwind (Database) section.