> 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/datenquellenunterstuetzung-und-einbindung/june5-batch-connector/sql-befehl-unit-batch-headerdaten.md).

# SQL Command Unit Batch Header Data

The command to retrieve unit batch header data is a SELECT statement that is structured according to the following syntax:

```
SELECT
[Customer] AS [Customer]
,[Location] AS [Location]
,[DataSourceId] AS [DataSourceId]
,[Namespace] AS [Namespace]
,[Start] AS  [Start]
,[End] AS [End]
,[LotNumber] AS [LotNumber]
,[DataSourceKeys] AS [DataSourceKeys]
FROM
[dbo].[BatchHeaderInformation]
WHERE
[Start] >= <<TS_From>> AND [End] <= <<TS_To>>
```

This SQL command contains both keywords and alias names.

The keywords ***<\<TS\_From>>*** and ***<\<TS\_To>>*** are enclosed in double angle brackets. At runtime, they are replaced with the configured start time and end time of the query to limit the query period.

The alias names are in square brackets to the right of the word "AS". When editing this command, note that the contents of the columns assigned to the alias names \[Start] and \[End] are timestamp values.

{% hint style="info" %}
You do not need to modify the keywords ***<\<TS\_From>>*** and ***<\<TS\_To>>*** or the alias names in the command.
{% 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/datenquellenunterstuetzung-und-einbindung/june5-batch-connector/sql-befehl-unit-batch-headerdaten.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.
