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

# SQL Befehl Unit Batch Headerdaten

Der Befehl zur Ermittlung der Unit-Batches Header-Daten ist eine SELECT-Anweisung, die nach der folgenden Syntax aufgebaut ist:

```sql
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>>
```

In diesem SQL-Befehl sind sowohl Schlüsselwörter als auch Aliasnamen zu finden.

Die Schlüsselwörter ***<\<TS\_From>>*** und ***<\<TS\_To>>*** sind von doppelten spitzen Klammern umschlossen. Sie werden zur Laufzeit mit der eingestellten Startzeit bzw. Endzeit der Abfrage ersetzt um den Abfragezeitraum zu begrenzen.

Die Aliasnamen stehen in eckigen Klammern rechts neben dem Wort "AS". Beachten Sie beim Bearbeiten dieses Befehls, dass die Inhalte der Spalten, die den Aliasnamen \[Start] und \[Ende] zugeordnet sind, Zeitstempelwerte sind.

{% hint style="info" %}
Die Schlüsselwörter ***<\<TS\_From>>*** und ***<\<TS\_To>>*** sowie die Aliasnamen im Befehl müssen Sie nicht anpassen.
{% 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.6/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.
