With these SQL Wizards the Author can automate the creation of DATABASE ACTION's and their respective Child READ and WRITE ACTION's.
Note: Please note that at this point, the SQL Wizard is still in active development and as a result, it presently has limited functionality. The rest of this page is a detailed step-by-step guide that will produce expected results.
Note: Currently, the SQL Wizard only allows operations on a single table.
Select the Read SQL Wizard and press Finish. The New Application Wizard closes and the Read SQL Wizard opens.
Select a database from those already configured on the Database Selection window. StockData comes built-in so we use it in this example.
Note: To configure a database see Configuring Connections to External Databases. If you do not have access to the admin pages and the list is missing the desired database, you will have to contact one of your EASA Administrators to connect the database to EASA.
In the Field Selection window select Disable Relation Restriction.
Now select the fields to be used in a SQL query.
In the Add Filters window, below, construct a query by adding rows of conditions. Each row has four columns:
The Field column lists all items chosen on the Field Selection screen in the previous step. The Operator column lists options on how the field parameter should relate to the value parameter. The options are:
The Value parameter is an input box instead of a drop-down list. You may enter the desired value in the data type that matches the field parameter. The And/Or column is available if there is more than one filter and uses logical AND or OR on the filters to create the SQL query logic.
Note: As mentioned above, the SQL Wizard currently supports operations on a single table. Even though multiple tables may be initially selected and further steps in the SQL Wizard taken, an error message will be returned after the query is created. Additionally, the step in the Wizard between 'Add Filters' and 'Test Query' called 'Join Selection' if multiple tables were selected, but will produce the same error. Joining tables in the SQL Wizard is a feature for future releases of EASA.
The final Test Query window shows the query results. The query can be modified and Test Updated Query will return the new results.
Using the Write SQL Wizard is very similar to using the Read SQL Wizard. The first screen, Database Selection is the same for both, listing all the databases available for use with EASA. Once again, the list will only contain databases that are set up with EASA on the web pages.
On the next screen you can choose the desired Write Method. The available options are:
In this example we choose UPDATE.
The Field Selection window appears, below. Choose Disable Relation Restriction before choosing fields.
We will update the 'Industry' value for 'GOOG'.
The Value parameter is an input box instead of a drop-down list. We enter EXCHANGE.COMPANY=GOOG.
The final column called And/Or is only available if there are more than one row and is used to connect the rows with logical AND or OR parameters.
Click Next and the Statement Preview window appears. The WHERE clause has been filled out for us but we can edit the SET part of the query. Here we delete 'EXCHANGE.COMPANY=?,' and edit the second SET to be: EXCHANGE.INDUSTRY='Search Engine'