I have a database that makes new tables based on transactions everyday.
That activity is recorded in a table.
I can query that table called Statistics to see what table was created and when. So I can see that there was activity on table Qxxx134 and Qxxx473. The numbers are not sequential because tables are created over different databases. Still I can get the names.
If I go into table Qxxx134 I can see that the activity related to user Bob and user Sam
Here's the quandry: I want to update a field in the master user table to indicate activity. The field basically shows a join date. I can update that manually, but I'd like to do it dynamically.
So how can capture the usernames of users in the tables that have had activity in the last day?
I have the query to capture the tablenames and stored them in a new table called RecentActivity.
The column is TableName.
Any help would be appreciated.