in reply to Sending Custom Mass Mail - Fastest Way Possible

Seconding chacham's remark, I think prepending the table names with "$connect{database}." in the SELECT and UPDATE statements is superfluous, because you are connected with only that database.
Plus removing these parts would increase readability of the SQL strings.

Replies are listed 'Best First'.
Re^2: Sending Custom Mass Mail - Fastest Way Possible
by chacham (Prior) on Jun 02, 2015 at 14:08 UTC

    because you are connected with only that database.

    Good point. I completely missed that. FWIW, you can connect to another database in SQL Server by using a qualified object name, which includes the database name.

    Conversely, this cannot be done in Oracle, as it would require a database link, which instead follows the object name.