csharp:t-sql_ergebnistabelle_daily_check
T-SQL Ergebnistabelle (Daily Check)
Wenn man mehrere Tabellen als Daily Check absichern will, kann man sich diese Werte in eine Tabellenvariable speichern und sich ausgeben lassen:
DECLARE @TABLE AS TABLE(name nvarchar(128) PRIMARY KEY, countrows INT) INSERT INTO @TABLE (name, countrows) VALUES ('table1', (SELECT COUNT(id) AS countrows FROM table1)), ('table2', (SELECT COUNT(id) AS countrows FROM table2)); SELECT * FROM @TABLE;
Ich habe noch keinen Weg gefunden, das Ergebnis als View zu speichern, stay tuned
csharp/t-sql_ergebnistabelle_daily_check.txt · Zuletzt geändert: 2023/09/14 10:55 von ronny