deleting from the "source" table, not the filtering table

This commit is contained in:
Thierry Schork
2025-09-05 09:52:45 +02:00
parent f0f9c5f5fe
commit b0e4d245eb

View File

@@ -36,7 +36,7 @@ BEGIN
-- endregion
-- region Documedis_VaccinationCheck_LogData
DELETE [d]
DELETE [s]
FROM @tbl_to_del d
INNER JOIN [Documedis_VaccinationCheck_LogData] s ON [s].[DocumedisVaccinationCheckLogData_PK] = [d].[DocumedisVaccinationCheckLogData_PK];
PRINT CONVERT(VARCHAR(20), CURRENT_TIMESTAMP, 114)+' - Deleted from Documedis_VaccinationCheck_LogData. '+REPLACE(REPLACE(CONVERT(VARCHAR(100), CONVERT(MONEY, @@rowcount), 1),',',''''),'.00','')+' row(s) affected.';