T-SQL Query for Checked Out Files Email

Hi,

I've wanted to set up email notifications about checked out files for some time now, and finally got round to it, so I thought I'd share this.



It's a pure SQL Server solution - there's some downsides to that (this is not the prettiest code I've ever written), but it means no additional server software to install & maintain because SQL Server has built in scheduling, email and scripting.


I wrote 2 versions

  • No description (just filename and folder)
  • Includes the description.

the one that pulls up the description of the file is more complicated and less portable because your PDM variable that corresponds to the description is likely to be different to mine.


Appearance is customised with a