Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

SQL to find Row Count - response (1) by robpaller

$
0
0
No. DBQL doesn't seem to log records inserted, deleted, or updated by INSERT, UPDATE, DELETE, or MERGE operations. Do you have any timestamp or date fields on the table to track when records have been added and/or updated on the table? With these additional fields you can track INSERTS and UPDATES easier. DELETE would be a bit more difficult unless you were applying logical deletes to the table with a flag or expiration timestamp field. You could collect PARTITION stats on the table before and after the operation. Then using some SQL extract the table cardinality from the statistics before and after any operations against the table that would add or remove records. Otherwise, you are left with parsing the log files looking for activity statements to determine the records affected by the operation(s) in question and logging those to an audit or log table.

Viewing all articles
Browse latest Browse all 27759

Trending Articles