I am trying to write this SQL script in Snowflake. So here is a table:
tableName | count number |
---|---|
TableA | 23 |
TableB | 19 |
TableD | 0 |
The table above is a benchmark. It has row counts of each named table (i.e TableA has 23 rows) . I am trying to write a stored proc that loop through and gets a hold of count number (value) then goes back to a different schema where the actual tables are, then select count(*) those table and compare output of each number in the benchmark to actual count. if both counts are equal, copy the table into a new location, else return a message
Via Active questions tagged javascript - Stack Overflow https://ift.tt/WQMG1jy
Comments
Post a Comment