> For the complete documentation index, see [llms.txt](https://docs.videc.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videc.de/june5-3.7/en/webanwendung/datenquellen/datenquellen-konfigurieren/sql-ereigniskonfiguration.md).

# SQL Event Configuration

After you have selected an OLE DB endpoint and the data sources of the endpoint are listed, you must specify the selected column names for each data source. To do this, click on the button with the gear icon in the column named Event Configuration. A window for specifying the column names is displayed. Once the window is open, the setting can be performed.

The settings required to query events are made in two stages: First, the columns of the SQL tables are determined, and then these columns are mapped to the names specified by JUNE5.

To determine the columns of the SQL tables, two options are available: The first option is to select a SQL table from the list of available tables in the database, and the second is to define a custom SQL command.

### Select a SQL Table to Determine Columns

To determine the columns by selecting a SQL table, uncheck the checkbox labeled "Columns are not determined by the custom SQL command". Then select the table containing the data. When the JUNE5 Server has determined columns for the selected table, the columns are stored in the selection list and mapping can occur.

### Define a Custom SQL Command to Determine Columns

To determine the columns using a custom SQL command, check the checkbox labeled "Columns are determined by the custom SQL command", then enter the SQL command in the input field, and finally click the button labeled "Determine Columns". If the command has been successfully executed by the JUNE5 Server, the selectable columns of the SQL command are stored in the selection list and mapping can occur.

When mapping the column names, these can be both selected and deselected. A brief description of the event properties can be found [here](/june5-3.7/en/datenquellenunterstuetzung-und-einbindung/microsoft-ole-db/sql-tabelle-ereignisse.md). When mapping the column names, note that the content of the columns mapped to event properties with the display names "From", "To", and "Acknowledged" are timestamp values.

After you have finished mapping, confirm the dialog and then click the button with the disk icon to save your settings.

{% hint style="info" %}

* Events from a SQL Server cannot be determined until at least one column is correctly mapped and activated.
* The query period is limited by the column with the display name "To". If this column is not set and activated, the last 1000 events are retrieved.
* The custom SQL command for retrieving events does not need to contain an ORDER BY clause
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.videc.de/june5-3.7/en/webanwendung/datenquellen/datenquellen-konfigurieren/sql-ereigniskonfiguration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
