where Newtable > 0
and logDate > Dateadd(dd,-1,Getdate())
If @@rowcount > 0
<do the magic here>
I can’t for the life of me figure out how to return an error when the query returns multiple rows.
Single row is not an issue.
I want to display the DBNAME when multiple dbs have had new tables created which will notify the DBAs when this has occurred.