I am trying to get a list of tables from a table that stores table names with a where clause that gives me only the tables i need. I have a select for that, but I need to pass the tables to the beginning select statement that needs to take the tablename passed and do a count or where clause to get the data I need.
select count(*) from (select table from tables where ACTIVE = 1) AS t1) where mycolumn = 'UPDATE';
I am trying to pass the tables so I can get a count and tablename and update mycolumn to 'UPDATED'
I want to select the data first to verify contents before I do an update on the records.