Zum Hauptinhalt springen
•••••
Windows Tipps & SecurityPushing Container Images to Google Cloud Artifact Registry (Step-by-Step)(04.10.2026 um 00:40 Uhr)
•
Sichere ProgrammierungJLScript: Guia Completo da Sintaxe, do Básico ao Avançado(04.10.2026 um 00:41 Uhr)
•
Sichere ProgrammierungFlock Verdict: Why IT Leaders Must Stop Mass Employee Surveillance(04.10.2026 um 00:41 Uhr)
••
Sichere ProgrammierungFlock sob ataque: como detectar, se proteger e evitar multas(04.10.2026 um 00:42 Uhr)
••••••
Windows Tipps & SecurityPushing Container Images to Google Cloud Artifact Registry (Step-by-Step)(04.10.2026 um 00:40 Uhr)
•
Sichere ProgrammierungJLScript: Guia Completo da Sintaxe, do Básico ao Avançado(04.10.2026 um 00:41 Uhr)
•
Sichere ProgrammierungFlock Verdict: Why IT Leaders Must Stop Mass Employee Surveillance(04.10.2026 um 00:41 Uhr)
••
Sichere ProgrammierungFlock sob ataque: como detectar, se proteger e evitar multas(04.10.2026 um 00:42 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

step4

CREATE OR REPLACE FUNCTION get_table_activity_report RETURN SYS_REFCURSOR AS l_cursor SYS_REFCURSOR; TYPE t_table_stats IS RECORD ( table_name_col…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

CREATE OR REPLACE FUNCTION get_table_activity_report
RETURN SYS_REFCURSOR
AS
l_cursor SYS_REFCURSOR;

TYPE t_table_stats IS RECORD (
table_name_col VARCHAR2(40),
rows_last_45_days NUMBER,
total_rows_approx NUMBER,
percentage_change NUMBER
);
TYPE t_table_stats_tab IS TABLE OF t_table_stats INDEX BY PLS_INTEGER;
l_results t_table_stats_tab;
v_idx PLS_INTEGER := 0;

BEGIN
-- ... (Your loop and logic remains the same, populating l_results)
FOR r IN (
SELECT table_name
FROM user_tab_columns
WHERE column_name = 'INTERNTIMESTAMP'
AND data_type LIKE 'TIMESTAMP%'
ORDER BY table_name
)
LOOP
-- ... (The inner DECLARE/BEGIN/END block populating v_cnt and v_total)

-- Store the results in the collection
-- ... (Store to l_results(v_idx))
END LOOP;

-- Open the cursor and return it
OPEN l_cursor FOR
SELECT
t.table_name_col AS TABLE_NAME,
t.rows_last_45_days AS ROWS_LAST_45_DAYS,
t.total_rows_approx AS TOTAL_ROWS_APPROX,
t.percentage_change AS PCT
FROM TABLE(CAST(l_results AS t_table_stats_tab)) t;

RETURN l_cursor;
EXCEPTION
WHEN OTHERS THEN
-- Handle global errors if needed
RAISE;
END get_table_activity_report;
/


Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten step4

Thematisch verwandte Begriffe: step4 · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Nächster Beitrag