Using the Query Editor
Last updated
Last updated
© Copyright 2023, Astera Software
Astera Data Integrator provides the ability to create and display multiple queries while connected to different database servers, using the same user interface. The queries written are specific for each type of database. For your reference, a link to the query syntax documentation for each database server is given below.
Supported Database
Query Syntax
MS SQL Server
IBM DB2
Oracle
Sybase
MS Access
My SQL
When a query starts, it is not connected to the database. Hence, the New Connection Information dialog box is also launched at the same time. You can follow the steps for connecting to a database, for establishing a query connection as the process is the same.
Steps:
Click File > New > Query or press Ctrl + N. A new query is started and the New Connection Information dialog box appears. The Query module appears on the Main Menu.
Note: You can also click on the toolbar and select Query from the dropdown.
Follow steps 1 to 11 for Connecting to Single Database to establish a query connection.
You are ready to write query scripts in the Query Pane. You can write a new query or use the existing SQL Snippets to build your query. The Data Source Browser provides additional functionality while working with queries. For more information, click Using Data Source Browser with Queries. You can view the SQL Snippets window and the Data Source Browser from the Menu bar. Both these windows can be set to Auto-hide such that they get attached to one side of the application screen to maximize the Query Pane. The window reappears when you mouse over the tab.
Use the command buttons on the File Toolbar and the Query Toolbar to save, run, modify or search the queries.
Astera Data Integrator offers built-in code snippets called SQL Snippets to help you build your query. You can add these snippets to modify a query or build a new query.
Steps:
Click View > SQL Snippets. The SQL Snippets window appears.
In the SQL Snippets window, double-click a code snippet to add it to the active Query Pane. The code snippet is displayed in the Query Pane.
You can modify the existing template to write your own query.
Note: You can also press the shortcut Ctrl + K to add a snippet.
The query results can be exported and saved in a Microsoft Excel spreadsheet or a delimited file using the Export Query Results to Excel and Export Query Results to Delimited File respectively.
To export query results you can:
Use the commands available in the Query menu on the Menu bar.
OR
Click the Export Query buttons available on the Query Toolbar.
OR
Right-click in the Query Pane and select the desired command.
Click the Export Query Results to Excel button to export the results of the query to a Microsoft Excel Spreadsheet.
Click the Export Query Results to Delimited File button to export the results of the query to a Delimited file.