Help writing an SQL Script

Original text of this message