Query editor |
Query editor represents dialog for visual creation of query with use of ' drag and drop ' technology. The general view of dialogue is submitted in picture:
In the top part of Query editor the panel of tools containing following command buttons is located: - Exit with saving of query. - Exit without saving of query. - Choice of DB location (Select database name). - New query. - Hide/show bookmarks (Settings, Query text, Query results). - Hide/show the list of DB tables names. - Generate query, i.e. to generate query text. - Execute query. - Save results of query.
At activation of the given button the window of Saving of a data set into a file opens. In this window the fields displayed in the right list, their aliases (the user can set his own field name, having clicked twice by the left mouse button on the chosen cell) and type of saved file are set. - Refresh tables list.
Query editor window is divided onto two parts by vertical line: In left part the panel of design is located, on which the user places tables, specifies link fields. And in the right subwindow a list of database tables is located. If location of a database was not specified at activation of Query editor dialog, then set it, having pressed Select database name button on the tools panel. In the right subwindow the list of database tables will be displayed. Mark the required table in the right subwindow, with pressed left mouse button, drag it on the design panel. Names of the table and all its fields will be displayed on the panel. To the left of a field name there is a flag. For selection of records from the table it is necessary to click the left mouse button on a flag of a field then the tick will appear. After flag installation the information about table field is automatically filling in Settings bookmark. By default sorting is absent. To set sorting the given field, press the left mouse button on the arrow located in Sort line. It is possible to include fields from different tables into a data set. To set link between tables, execute the following: 1. Place the tables on the design panel; 2. Click on the name area of the field in one of tables and, not releasing the left mouse button, drag cursor onto name area of the table field with which link will be realized. "An equal sign" comparison operator () is given by default. To change link parameters, click the right button on the given operator. For cancellation of link and choice of fields click the right mouse button on the list of the table fields. For receiving the query text corresponding to visual query, it is necessary to press Generate query button in the tools panel. If there are no mistakes in query construction the window of SQL-query editor automatically opens, where the text of the received query in SQL language (Query text bookmark) is contained. For query execution it is necessary to press the button with image of a yellow lightning in tools panel. Before query execution a check of its correctness takes place. At execution of correctly made query a window containing records of a data set, which is query result (Query results bookmark) appear. Results of query can be saved by pressing Save results button on the tools panel. The query text can be saved in the project by pressing Ok button on tools panel.
Main information about SQL language
|