I am fairly new to T-SQL and know just basics. So bare with me I work at a hospital and one of the directors is needing something that will notify them when a patient is readmitted with 30 days of previous admit. I have written a script that will do that, but it has to be manually run and they are wanting it to happen basically real time.
My question is there a way when a patient is admitted that it will run this script then populate a file that is then sent in an email to that individual? I don't have the rights to create or edit tables on the prod server, but was able to get a database on another server that I can do with what I want....if that helps ?