OctaFish
Verenigingslid
- Lid geworden
- 6 feb 2009
- Berichten
- 43.693
- Besturingssysteem
- Windows 10/MacOS
- Office versie
- Office 365
Hier alvast een uitbreiding op de berekening, waar het veld PatientID aan is toegevoegd.
Je ziet, het is echt niet moeilijk om er een extra voorwaarde bij te zetten 
Code:
Vorig_EindTijd: (SELECT TOP 1 [VTGM_Bereidingstijd] FROM CATO_VTGM_1 AS T1
WHERE T1.VTGM_Bereidingsdatum = CATO_VTGM_1.VTGM_Bereidingsdatum
[B][COLOR="#0000FF"]AND T1.Patient_Id = CATO_VTGM_1.Patient_Id [/COLOR][/B]
AND T1.[VTGM_Bereidingstijd] <CATO_VTGM_1.[VTGM_Bereidingstijd]
ORDER BY T1.VTGM_Bereidingsdatum DESC, [VTGM_Bereidingstijd] DESC)
