Einzelnen Beitrag anzeigen

HCB

Registriert seit: 12. Feb 2020
141 Beiträge
 
Delphi 12 Athens
 
#16

AW: Access SQL Query optimieren?

  Alt 16. Jan 2024, 17:04
@delphi.narium
Das mit den Views und deinem SQL Code hat sagenhaft funktioniert!! Ich lerne jetzt wieder ein wenig dazu! Vielen, vielen Dank.

Eine andere SQL Optimierung wäre wahrscheinlich auch hier möglich:

Delphi-Quellcode:
SELECT A.BestDocErfNr, A.BestDocDatum, A.BestDocLiefNr,A.BestDocKurzbez,U.BestPosAusstand,U.BestPosArtNr,U.BestPosBestNr,U.BestposName1,U.BestPosEPreis,L.ArtAltArtNr
FROM (BestDok As A inner JOIN BestPos As U
On A.BestDocID = U.BestPosDocID )
INNER JOIN sArtikel as L
      ON U.BestPosArtNr=L.ArtNr
WHERE A.BestDocOptGeliefert = false and U.BestPosAusstand > 0 and A.BestDocType = 0
and U.BestPosArtNr = :ArtNr
order by A.BestDocErfNr asc
Wie würde das hier mit den Views funktionieren?
Ich möchte dich wirklich nicht beanspruchen, eilt nicht. Vielleich wenn du wieder mal Zeit und Lust hast.

LG Harry
  Mit Zitat antworten Zitat