Änderungen in der Suche

This commit is contained in:
2026-03-11 17:24:14 +01:00
parent 58325e8583
commit dcfadb51d3
5 changed files with 136 additions and 25 deletions

View File

@@ -208,14 +208,21 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
t.Ben8,
t.Hersteller,
t.Stat,
t.VkTeil,
txt.Text AS [Text],
ts.PrsVk AS PrsVK,
ts.Ersatz AS Ersatz
FROM TEILE t WITH (NOLOCK)
OUTER APPLY (
SELECT TOP 1 MemoID
FROM EKATSS WITH (NOLOCK)
WHERE [Teil] = t.Teil
ORDER BY (SELECT NULL)
) ek
OUTER APPLY (
SELECT TOP 1 [Text]
FROM TEXT WITH (NOLOCK)
WHERE TextId = t.MemoID
WHERE TextId = ek.MemoID
ORDER BY LfdNr
) txt
OUTER APPLY (