The possibility of constructing queries across multiple tables in the

"1Ñ: Enterprise 8.2"

 

Procenko Victor , 4th year student of the specialty " 5B070300 - Information Systems"

Sh. A.Baitursynov

Irina Morozova , Senior Lecturer , Department of Information Systems

KSU . A.Baitursynov

 

For the leadership of any organization's greater interest was in essentially a processed form (the selection of the parameters , the resulting aggregated data ) . For example, the receipt of the goods within the specified time period, grouped by affiliates or lists of employees of partner companies with their phones.

In the 1C: Enterprise solutions for such problems , a special object called a query. Essentially, any request to a requirement for the system to extract the sample with the necessary information from the database. and the practice of this object is most often used when you create reports .

A query is a text for a special query language. This text describes the information that is the source for the query, and identifies the condition for building a query . More approximate to the 1C: Enterprise source of information is defined as: which table the information base used as a data source for the query, as well as which fields are required to process the tables in the query. Tables involved in the query are divided into two main classes : the real and the virtual . Their difference lies in that the real tables are stored in the database tables and virtual base no information. When accessing the virtual tables of information system itself automatically collects information from the actual database tables for the query. In practical problems virtual tables are used much more frequently in connection with the already bundled in their information .

Along with the usual selection of information requests and can perform many useful functions , such as grouping of selected data , calculation results , etc. In practice, the implementation of complex application solutions queries are used in situations when you need to set up a complex sample data from several tables, grouped and sorted desired.

Request - a special object in the 1C 8.2 , which is used to build and execute queries to the database tables in the system. To make the request to make the query text that describes what the table will be used as a data source query , which you need to select the field , which to apply sorting and grouping, etc. Query Language 1C 8.2 syntax is very similar to other SQL database query language , but there are differences. Of the main advantages of a built query language is worth noting dereference fields , the presence of virtual tables , comfortable working with the outcome and not typed fields in queries. Of the shortcomings - as the output fields can not use a query , you can not use stored procedures , you can not convert the string to a number.

Processing Console requests for managed application repeats the familiar interface and most of the functionality of processing queries Console for 1C 8.2 . It also allows you to get the results of batch queries and temporary tables . The desired result of the composition is selected in the choice of getting the results of the three options : Only queries, and temporary tables , temporary tables only .

Requests performed as a thick and a thin client , because the query is addressed to the server.

Demand file (. Sel) for the Console queries managed mode is similar to file requests for the Console Platform 8.1 , you can open existing files queries developed in 8.1. Similarly, files that were created in the Console -managed mode , you can open in the Console 8.1.

The constructor is called query by right-clicking the query text field . Query Design in the thin client is not available - the menu item Open Designer blocked . In a thick client managed application query designer is available. Managed application does not support highlighting the key words of the text query, so the entire text of the query is displayed in black.

The parameters of the current request are entered on the Settings tab query on the upper left side of the form Console. By clicking the Fill is made auto-complete list of parameters from the query text.

You can set the parameter type. To do this, you must assign the parameter type OpisanieTipov and set the desired type. If you set a component type, it will use only the first value of the structure types.

Query parameters such as Border and MomentVremeni edit tab on the inside of Special Settings tab query. They can be entered manually by clicking the Add button, and translate into the category of "special" parameters inside the General tab, click in the checkbox in the column of a special type - when you click on the check box displays a warning message and a positive response to his argument will be transferred to bookmark special. (When auto-complete list of options on the button Fill in all parameters fall on the General tab). To create a batch request in the 1C: Enterprise 8 shows the proposed placement.

Batch request is a query described as one big request. These queries are executed one after the other. The outcome of any of these requests can be placed in a temporary table and refer to it from another query. Batch request help consolidate data from multiple tables, the results of their samples.

A positive result of a query batch can be considered that when the results of the inquiries are placed into a temporary table, they can be used multiple times. There is no need to carry out several times one and the same sub-request, and select the data from the finished table.

However, when using temporary tables in the batch requests, the system generates a real database table. And the time is spent on the creation of the table, and after the execution of a request for its destruction.