I am working against a mssql 2005 db. I have largely tought myself sql, and as you will probably notice from the script below, I have lots to learn.
The following logic collects encounters that need to be deleted, and then uses a fetch statement to accomplish the deletions. It works, but it...