0

Noob here. I'm trying to learn loops and procedures in Teradata.

I have a set of tables (say TABLENAME) listed in dbc.tables
I'd like to loop thru the set and validate that a specific field satisfies a business rule (say contains the string 'INFO'). The column name and rule is common across the set of tables.

The end result is a table with four columns:

TABLENAME | total_rows | rows_passed| rows_failed.

How would I accomplish this? Thanks in advance.

  • Have a look at this question https://stackoverflow.com/q/28558288/2527905 Btw, never use non-V system views, `dbc.TablesV` instead of `dbc.Tables` – dnoeth Sep 29 '20 at 08:54
  • Why on earth do the non-v system views still exist, and/or continue to truncate names longer than 30 characters? I know the V views do other things, at least in general, but that's the difference most of us care about. – Andrew Sep 29 '20 at 16:07

0 Answers0